开发者

using statement in asp.net web forms works locally but not live?

开发者 https://www.devze.com 2023-02-03 18:18 出处:网络
UPDATE : is there any iis 7 setting which might cause this issue? I recently moved to iis 7.0. So I am having this weird issue where my code works locally but not when i deploy it live.

UPDATE : is there any iis 7 setting which might cause this issue? I recently moved to iis 7.0.

So I am having this weird issue where my code works locally but not when i deploy it live. Fo开发者_JS百科r example -

Employee e= new Employee();//does work locally 
Employee e= new Employee(); // does not work live..says cannot convert Employee to  MyLibrary.Model.Employee
MyLibrary.Model.Employee e= new MyLibrary.Model.Employee();////works live

So for some reason from the above code you can see it is not basically finding my using statements in the file.Although I have them it asks me to declares its full qualified name. Does anyone know what is happening?


The only time I have seen problems like this when dealing with ASP.net is when a stale assembly has been cached.


You probably don't have MyLibrary.Model.dll referenced in the live build.


Do you have two different assemblies referenced that both define an "Employee" object?

If so, you will need to fully qualify the objects.

0

精彩评论

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