Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot create webservice datasource in Umbraco V8.4 / Forms V8.2 #265

Closed
jstrugnell opened this issue Jan 15, 2020 · 1 comment
Closed
Labels

Comments

@jstrugnell
Copy link

jstrugnell commented Jan 15, 2020

When trying to create a webservice datasource in Umbraco Forms, I'm getting an error message of:

Datasource failed to save: Compilation Error Creating Assembly

Reproduction

Install Umbraco V8.4 (maybe others, that's just what I'm using)
Install Forms V8.2
Navigate to the Forms section, click on "Datasources", then "Create"
Give it a name, choose "Webservice" for the Type field
Enter a web service URL - e.g. http://www.gcomputer.net/webservices/dilbert.asmx
Enter something for the Service Name and Method fields, to test this bug it does not matter what you put here.
Click "Save"

Bug summary

Cannot create a Forms datasource connecting to an external web service.

Stack Trace:

Exception
System.Exception: Compilation Error Creating Assembly
at Umbraco.Forms.Core.Persistence.Schema.Analyzers.WebServiceAnalyser.CompileAssembly(ServiceDescriptionImporter descriptionImporter)
at Umbraco.Forms.Core.Persistence.Schema.Analyzers.WebServiceAnalyser.BuildAssemblyFromWSDL(Uri webServiceUri)
at Umbraco.Forms.Core.Persistence.Schema.Analyzers.WebServiceAnalyser..ctor(Uri webServiceUri)
at Umbraco.Forms.Core.Providers.DatasourceTypes.Webservice.get_Analyser()
at Umbraco.Forms.Core.Providers.DatasourceTypes.Webservice.ValidateSettings()

Specifics

I've tested this while running directly from Visual Studio 2017 using IIS Express
I've also tested it running the same site through full IIS (on localhost)

Expected result

Not sure, never seen it work.

Actual result

Datasource failed to save: Compilation Error Creating Assembly

Umbraco Forms Issue

Umbraco Forms Error Log

A Potential Fix

I have decompiled the code and reconstructed in a test project. I managed to raise the same error and was able to stop it happening.

There is a line of code in the CompileAssembly method of the WebServiceAnalyser class that looks like this:

CompilerParameters compilerParameter = new CompilerParameters(new string[] { "System.Web.Services.dll", "System.Xml.dll" });

Reviewing the error while debugging, it was complaining about needing a reference to "system.dll" so I modified the above code to include system.dll, se below:

CompilerParameters compilerParameter = new CompilerParameters(new string[] { "System.dll", "System.Web.Services.dll", "System.Xml.dll" });


This item has been added to our backlog AB#5508

@nul800sebastiaan nul800sebastiaan added the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Jan 15, 2020
@umbrabot
Copy link

umbrabot commented Mar 7, 2021

Hiya @jstrugnell,

Just wanted to let you know that we noticed that this issue got a bit stale and might not be relevant any more.

We will close this issue for now but we're happy to open it up again if you think it's still relevant (for example: it's a feature request that's not yet implemented, or it's a bug that's not yet been fixed).

To open it this issue up again, you can write @umbrabot still relevant in a new comment as the first line. It would be super helpful for us if on the next line you could let us know why you think it's still relevant.

For example:

@umbrabot still relevant
This bug can still be reproduced in version x.y.z

This will reopen the issue in the next few hours.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@umbrabot umbrabot added the status/stale Marked as stale due to inactivity label Mar 7, 2021
@umbrabot umbrabot closed this as completed Mar 7, 2021
@umbrabot umbrabot removed the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Mar 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants