I have a WCF Service project. It builds with no error and runs in Visual Studio (2015). When I attempt to access the service page via the Browser, for example, http://localhost:59007/MyServiceEndpoint.svc it shows a yellow screen of death with references to Owin.
Hello ?! Whats OWIN got to do with it? I've used WCF before OWIN was invented, did not use OWIN before and don't intend to use now. I checked my Proj References, and there is no reference to Owin Dll's anywhere. What's going on?
It turns out even though I was not referencing OWIN anywhere in my WCF project, somehow the OWIN DLL's (Microsoft.Owin.dll, Microsoft.Owin.Host.SystemWeb.dll, Microsoft.Owin.Security.dll, Owin.dll, Microsoft.Web.Infrastructure.dll) were present in the /bin of my WCF project.
I deleted all of them manually and now the yellow screen of death is gone !
It may also work to add this to web.config's appSettings:
Related
When I try to host my WCF service in IIS, I got this error:
The DefaultHttpHandler.BeginProcessRequest method is not supported in the integrated IIS pipeline mode.
How to fix this? Didn't find the solution in google.. (Or I have not searched well enough)
To be more specific:
I made in Visual Studio a new solution: With 2 projects:
1) HelloAcmeClient
2) HelloAcmeService
This solution is stored in: D:\robbe\Documents\Visual Basic\repos\HelloAcmeService
For my IIS, everything is stored in: C:\inetpub\wwwroot\HelloAcmeService
My map looks there like
The IIS-map where I store everything
I know this is working because, I tested it with a stuff.html file.
My project in Visual studio 2013 consumes Acumatica web service APIs on another server. I had no problem with adding web reference and calling Acumatica web service API in my code, until recently I added new API into the web service in Acumatica, and then tried to update web service reference in my project. I right clicked on "web service" in Visual studio and then click on "update web reference" to update, however, I was still getting the old APIs, even though I used exactly same URL. I put the URL in browser and I could see the new APIs but when I tried to update, I just couldn't get them into Visual Studio.
When I put that URL into browser to view the WSDL XML, I noticed I only got new APIs after I logged into Acumatica and I was getting old APIs before I logged in. It seems Acumatica only sends updated WSDL xml after users log in, which causes problem to Visual Studio, since there is no way to log in first in Visual studio.
Actually I had successfully updated my web reference before, but almost every time I tried to update reference, I got this problem, then after keeping trying many times, the reference eventually got updated...but this time, the problem seems to just hang on there and doesn't go...
By the way, I tried to go to command line to use wsdl.exe to generate reference class but still got old APIs.
I just don't understand why Acumatica requires logging in to give out new APIs...
If anybody could give me any clue to solve this problem, that would be really appreciated.
(Converting my solution from a comment to an answer)
I believe the Visual Studio GUI frontend for wsdl.exe does allow you to perform a login action (by showing a WebBrowser control) prior to downloading the .wsdl file, but in the event that doesn't work you can always manually download the .wsdl via your desktop browser and then invoke wsdl.exe from the command-line, providing the downloaded file as a command-line argument.
No matter what I change in an asmx service in Visual Studio, the WSDL file stays always the same. Deleting methods, changing method signatures don't have any effect when I browse to service definition.
I have had a simular problem.
When removing an enum and replacing it by a string, the enum wouldn't go away from the wsdl. No matter what I tried (clean, rebuild, clear browser cache, other browser), it kept returning the enum as a complex type within the WSDL.
The solution in my case was remove the local folders of the project via windows explorer, then perform a get latest from TFS. After this the problem was solved.
Of course this solution only aplies when using a sourcecontrol system.
After changing your service, you must build it and ensure that the new version is running. One shortcut would be to build it (and make sure there are no errors), then right-click the .ASMX file and choose "View in Browser".
Also, although I'm sure you're aware of it, you should not be using ASMX web services for new development. Microsoft now considers ASMX to be a legacy technology. Use WCF instead.
I have encountered this problem and have a solution.
Cause: When you create a new "Web Service" project in Visual Studio, it automatically adds a "Service1.asmx" file to your project. You rename this file and change the class declaration inside of it, but Studio still thinks it's "Service1" wnd will only ever display the web service definition for "Service1".
Solution:
Delete all "bin" and "obj" folders in your project.
Copy the methods from your existing asmx file to notepad.
Remove the service from your project.
Add a new service to your project, with the name you want.
Paste the code from Notepad into the new service.
Rebuild All
Your asmx should now accurately reflect your web service and update normally on future builds.
I had today the very same issue. It was caused by a GACed version of the assembly that contained the type definitions exposed by the web service. I had to remove the assembly from the Global Assembly Cache first, like:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" /u YourAssemblyNameWithouthDllExtebsion /f
Be sure to restart the web server hosting the web service to reload the new version of the assembly, for example, in case of IIS Express, you can kill the former process instance by PowerShell:
(Get-Process -Name iisexpress).Kill()
After that, the updated WSDL version was displayed as expected.
I have a reference to a web service written in java. I need to use it in my BizTalk project. So I add the reference via Add Service Reference - Advanced - Add Web Reference since java web service is not a WCF service. OK, VS generates for me XSDs and ODX for the service. But when I try to compile the project, I get very weird error "Missing partial modifier on declaration of type XXX; another partial declaration of this type exists". The same error is described here.
I thought that I'd missed something so I created a brand new solution, added there a Console Application, added the web reference and that solution builded successfully. Thus I can conclude that I get the error only if I add a web service reference in BizTalk solution.
I tried to fix the error manually, opened the Reference.map.cs file, added ".Biztalk" suffix to the generated namespace and everything compiled successfully. Is it really a bug in code generator for BizTalk project or am I missing something?
Not sure, I have never seen that error...
However, what I would do is create a class library project and add the web reference here. You can then use this in the SOAP send port, as described here (see point #5). You can also reference the class library in your BizTalk project directly. Since you said that the web reference works in a Console application, perhaps this could work...
Also, you could use the XSD schemas directly - but this will require more work. You will have to promote a couple of properties manually in an orchestration or custom pipeline component. You can find more details on this post (website is currently down, but hopefully will be back online eventually).
Finally, you could also try the WCF adapter, using the httpBinding. That's designed for interop and should work as long as you have the schemas to define the messages.
Good luck!
I deployed a web service to iis 7, it was working all the way right.
Then I wanted to update the code of a web method in the web service.
I recompiled the service and updated the dll in the iis directory with the new one.
My problem is when I invoke the service, it invokes the older code.
I tried changing the number of parameters passed to a web method inside the service, and when invoking it still sees the older parameters which I erased.
Web services after Framework 2.0, are compiled as DLL files by default as far as I know. Normally, this happens when you PUBLISH the website and webservice, or when you use Web Applications.. But in WebServices, Visual Studio compiles the output as DLL. Therefore, you should compile your dll and update on the IIS. Even though you see the CS code files on IIS folder, they are not being used. Only the asmx file (not asmx.cs) are used to map the code in the dll.
I am guessing that the old code is cached. Try restarting IIS. That should cleanup any remnants of the old code.
It seems that you need to update your service reference.
Go to the project who's using the service, left-click the service reference in your solution explorer and finally choose "Update Service Reference".
Maybe I'm wrong and you did it, but as you don't mention that in your question, this is my suggestion.
rebuild the solution, And deploy the service on IIS. It will work definitily