Last post Jun 09, 2014 09:59 AM by mjring
May 08, 2014 09:16 AM|mjring|LINK
I have a web project that contains multiple ASMX web services. These services are consumed by an ASP.NET 2.0 web application project. Both are sites hosted internally within our corporate intranet and run using Windows authentication.
I recently re-compiled the web services project from .NET 3.5 to .NET 4.5. No other changes were made. After deploying the changes, the ASP.NET 2.0 web application started reporting errors when trying to connect to the web services.
Here are the specific changes I made as part of the deployment:
Any suggestions would be most appreciated.
May 09, 2014 03:44 AM|Fuxiang Zhang - MSFT|LINK
Thank you post the issue to our forum.
According to your description, I see you upgrade your web service from .net 3.5 to .net 4.5 version.
And your asp.net application cannot call it anymore. For this issue, I suggest you make sure your web service can be called by client.
Please try to input the web service file (.asmx) path to your browser and see if you can get it's WSDL like below.
If you can get the WSDL from the web service, you can readd the service reference to this web service in your asp.net application.
Hope this helps, thanks.
May 09, 2014 11:35 AM|mjring|LINK
I also reviewed the actual WSDL being generated between the .NET 2.0 and .NET 4.5 services and they are nearly identical. The only discrepancy I found was in the re-ordering of the attributes within the <wsdl:definitions> element. (The values themselves
stay the same).
The .NET 2.0 service starts like this:
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" <!-- xmlns:soap is the first attribute -->
The .NET 4.5 service starts like this:
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" <!-- xmlns:soap is moved further down the list, but otherwise unchanged -->
May 12, 2014 01:33 AM|Fuxiang Zhang - MSFT|LINK
Thanks for your back.
There are some differences between above <wsdl:definitions>, please note it.
#.net 2.0 targetNamespace=http://dndt.principal.com/ but .net 4.5 targetNamespace=http://www.myserver.com/
# .net 2.0 xmlns:tns=http://dndt.principal.com/ but .net 4.5 xmlns:tns=http://www.myserver.com/
Besides, is there any error message occurs when you call the web service from .net 2.5 client?
May 12, 2014 11:25 AM|mjring|LINK
Sorry about that... that was me attempting to scrub the data on here to remove specifics. In my actual code, those attributes do match up.
The errors received from the .NET 2.0 application are mentioned in the original post. Visual Studio itself does not produce any errors.
May 12, 2014 09:18 PM|Fuxiang Zhang - MSFT|LINK
Sorry to say that I cannot figure out what caused this problem just with the simple error message.
I suggest you enable trace in the web service and see what happened from diagnostic file.
<trace autoflush="true" />
<add name="AsmxTraceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="local.log" traceOutputOptions="LogicalOperationStack, DateTime, Timestamp, ProcessId, ThreadId" />
<add name="System.Web.Services.Asmx" value="Verbose" />
Note that tracing is only enabled when the application is fully trusted.
Hope that helps, thanks.
Jun 09, 2014 09:59 AM|mjring|LINK
After adding some further tracing within the web service methods, it appears that it's not an ASP.NET or ASMX issue so much as an issue with a legacy class library that was still compiled against .NET 2.0. The class library contains the Data Access Layer
(DAL) and was using the .NET 2.0 Table Adapters. Apparently, upgrading the ASMX service layer to .NET 4.5 while leaving the DAL at .NET 2.0 introduced some performance issues.
Looks like I'll be working on converting the DAL to utilize Entity Framework as well.