开发者

ASP.NET: Error while accessing the JSON Webservice from server

开发者 https://www.devze.com 2023-02-05 05:29 出处:网络
I have a website where I am using the JSON webservice. I have uploaded my website on the server. Problem:

I have a website where I am using the JSON webservice. I have uploaded my website on the server.

Problem:

When I try to access the webservice it gives me the error as shown in below screenshot. In the below screenshot MyServices is my webservice. MyServices.asmx is the name of the file 开发者_开发问答that I am trying to access.

Troubleshooting that already has been done:

I tried cleaning the bin folder and rebuilding again. But it didn't work.

What could be wrong?

ASP.NET: Error while accessing the JSON Webservice from server


This error might occur if you are using a Web Application type project (in contrast to Web Site) and you have put code in the App_Code special folder. This folder should be used only with WebSite project types. A Web Application is compiled meaning that all source code is precompiled into an assembly and placed into the bin folder. On the other hand App_Code is a special folder. ASP.NET automatically compiles dynamically everything in this folder when the first request arrives so you find yourself with two assemblies that contain the same class.


Visual Studio uses different icons to represent web site and web application which might help you find out which type you are using:

ASP.NET: Error while accessing the JSON Webservice from server

0

精彩评论

暂无评论...
验证码 换一张
取 消