|
-
Apr 14th, 2011, 06:01 AM
#1
Thread Starter
Fanatic Member
Problem in web.config?
I am developing in VS2010 on a Windows 7.0 box
Yesterday I created a web service. VS2010 targetting Framework 4.0 does not seem to have a Web Service Template - so I changed the Framework to 3.5 (which showed a Web Service Template) - created the web service and then changed the target framework of the web service to 4.0
I then tested the web service and it worked correctly.
I then added a reference to that web service to a web application which I open using local IIS. As soon as I did this the site would not compile and showed this error:
The value for the 'compilerVersion' attribute in the provider options must be 'v4.0' or later if you are compiling for version 4.0 or later of the .NET Framework. To compile this Web application for version 3.5 or earlier of the .NET Framework, remove the 'targetFramework' attribute from the <compilation> element of the Web.config file
I don't have any 'compilerVersion' attributes in my web.config.
All I have is:
<compilation debug="true" targetFramework="4.0">
which is under <system.web>
So, I removed the reference to the web service but it still won't compile.
If I open the site from the file system - it compiles okay.
So, it won't compile when opened using local IIS but it does compile when opened from the file system.
If I publish the site (with the web service reference in place) to a server - it works fine - including calls to the web service.
Sometimes I hate this .net environment and yearn for the days of good old ASP pages and a nice bit of vbscript. It may have been terrible to write, manage and de-bug - but at least it worked consistently!
Any ideas? Thanks for any help.
p.s. I have tried using the latest web.config from the archive and it still won't compile when opened under local IIS
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|