server 500 error

2414
3
11-05-2010 10:40 AM
ScottTansley
New Contributor II
Hi,

This is probably a really pathetic question, but I'd appreciate some help!

I wrote a Silverlight APIv1.0 app against 9.3.1.  I've recently upgraded to 10.0, and so I thought I'd move everything over to APIv2.0.  My app works fine when debugging but when I publish the app to IIS I get all sorts of errors.  Initially, i was got a "Unrecognized attribute 'targetFramework'" - I quickly worked out that the Application Pooll the app was running against was .Net 2.0.  So I created a new "4.0 Intergrated" pool, and then pointed my web application at that.  I have checked "basic settings" on IIS7 (win 7 64-bit), and can confirm it's looking at the correct pool.  when I look at the pool, it tells me that 1 application is referencing it.

The problem now is that I've got a server 500 error.  Thinking my code was bad, I created a new Blank Silverlight app on it, dropped a map control on - pointed it at a dynamic layer, and it runs in debug - but exactly the same on iis.  I even created an ESRI Standard Silverlight Template app, and built/published it raw and I get the same problem.

The laptop was only built this week, is runnign ArcGIS Server 10 with no problems. 

One thing I should point out, is that it is fine if it runs as a html page, but I need it to run as an aspx, as I have a web.config with some initial settings that it needs.

Any pointers would be most gratefully received.

Kind Regards,

Scott
0 Kudos
3 Replies
DarinaTchountcheva
Occasional Contributor II
Hi Scott,

I have just deployed yesterday a .Net Framework 4 application on IIS 6.
I did all the steps you did (I had to install .Net Framework 4 too), and after all this I got 404 error.
I resolved this by allowing the ASP.Net 4 Web Extension (it was prohibited after the installation) on the web server.

I know your error is different, but check if ASP.Net 4 is allowed on your IIS7. And here is a little hint where to find the web extensions on IIS7 (I am still finding my ways around IIS 7):

http://blogs.msdn.com/b/rakkimk/archive/2007/08/17/iis7-where-is-the-web-services-extensions-option-...

Hope this resolves your problem.
Please post your solution if you figure it out, because I will have to deploy on IIS 7 too. 😉

Good Luck!
0 Kudos
StevenMorlock
New Contributor II
also make sure your application pool is running in 32bits mode if you are using (serverside) ArcObjects.
0 Kudos
ScottTansley
New Contributor II
Heh Darina,

Thanks for your help.  Much appreciated.

As you suggested, I read the instructions that you sent through, and registered the web extensions.  Still no joy, then noticed what you said about installing .Net 4!  As I mentioned in my first post, my laptop has been rebuilt this week. The guy from tech services had installed Visual Studio 2010 before installing IIS.  It would appear that .Net 4 therefore does not get properly registered with IIS, even though you can set up the Application Pools.

I found that there is a aspnet_regiis tool, which allows you to install .Net 4 onto IIS.  Read here:

http://msdn.microsoft.com/en-us/library/k6h9cz8h.aspx

Undertook this for both 32 and 64 bit frameworks, retested my app - and heh presto.

So, many thanks for pointing me in the right direction!  🙂

Hope you have a great weekend.

Scott
0 Kudos