开发者

'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services'

开发者 https://www.devze.com 2023-03-06 12:16 出处:网络
I\'m currently working on an existing ASP.NET project. At the moment I have to integrate a new componant so for that purpose I had to change the framework target from 2.0 to 3.5. After regenerating t

I'm currently working on an existing ASP.NET project. At the moment I have to integrate a new componant so for that purpose I had to change the framework target from 2.0 to 3.5. After regenerating the solution, I'm now dealing with a strange issue.

Here's the code :

<WebService(Namespace:="http://tempuri.org/")> _
&开发者_开发知识库lt;WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
<System.Web.Script.Services.ScriptService()> _

And the last line returns that error :

'ScriptServiceAttribute' is ambiguous in the namespace 'System.Web.Script.Services'

I have definitely no clue what's going on in my code ?! Is it an internal error of the ScriptService constructor ?

Thanks in advance for your help !


You must have a reference to two different versions of the System.Web.Extensions assembly. Check both your project reference as well as to make sure that whatever is configured in the <compilation> section of your web.config are aligned. Also you might want to check if you have an explicit @Register statement in your service that might have a mismatched version number.


I checked my reference and it seems everything is alright ! I also checked the web.config and I cannot figure out any issues. Concerning a @Register statement, I don't really where could I find any as this is not my own project and I don't know where this service could be used.

0

精彩评论

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