views:

926

answers:

3

I have just deployed my first application in .NET MVC and i'm having issues.

I have resolved the iis 5.1 problems with the routing (If anyone is looking for this go here: http://itscommonsensestupid.blogspot.com/2008/11/deploy-aspnet-mvc-app-on-windows-xp-iis.html )

**Now my issue is that wherever I call db.SubmitChanges() on my data context it seems to stop the code from continuing and doesn't do the update. Is there a step I'm missing when publishing my website? **

A: 

I suggest looking in the Event Log to see if any information was logged as to why the application exits. Also, I suggest you post what platform you're running on. In particular, 64-bit?

John Saunders
+1  A: 

you probably have run into the same issue I did try this

http://stackoverflow.com/questions/632277/linq-to-sql-insert-not-working-on-deployed-serveriis

oh and a good way to find out any errors cause i wasnt getting any exceptions either is to throw all your db code into a try catch and return "pass" or if failed return ex.ToString()

you can also throw the error code into a viewdata object and output on your view by using <%= ViewData["errorMessage"] %>

Ayo
thats exactly what i ended up doing, but thanks anyway
Andi
+1  A: 

This was a problem with the database being read only when i exported the webapp. It didn't give me a nice error message or exception though it jut seemed to break. I checked under IIS and the user account it was trying to use only had read permissions.

Once i changed this i restrarted IIS (not stop/start which i did the first time by accident) and the problem was resolved

Andi