Fluent NHibernate - Castle Dynamic Proxy - trust issue on localhost - iis-7

A while back I had a problem running an app using NHibernate on the production box. The answer (thanks to stackoverflow - questions/1469408/) was to change to full trust.
This worked great - however now I am trying to run the same application on IIS7.5 on localhost and am having the same problem. The .Net trust level is set to "full internal" so there shouldn't be a problem. Has anyone else ran into this problem? And if so, what was your resolution.
Any help much appreciated.

Setting the application pool to LocalSystem fixed it.
http://blog.igorware.com/2009/10/login-failed-for-user-iis.html

Related

Can't log into ASP.NET MVC site once on IIS

I finally got my ASP.NET MVC application hosted on my local Windows/IIS server. I went to the login page but when I try to log in it says,
Error:
An error occurred while processing your request
This is fairly non-descript...
My gut feeling is that when I did the web deploy, I didn't deploy the localdb(?) where the users' credentials are stored. Before I try to re-deploy the entire app, I'd like to see if anyone can offer some guidance. Am I on the right track? Are there other possible causes/solutions I should investigate?
I'm using the default registration/login system that is in the project to start with, and it woks just fine in VS. I did a regular web deploy to my IIS server, and the site works just fine until you go to log in.
Fixed: This issue was caused (as suspected) by the inaccessibility of the LocalDB where all the users' credentials are stored. VS uses this light DB instead of making you install SQL Express or another alternative (much like IIS Express works better for debugging than full IIS). When I push my application to IIS from VS, the database wasn't connecting. I eventually found this other SO question, and the top answer fixed my issue.
How to deploy ASP.NET MVC 4 application using localDB to local IIS on Windows 7?
This will solve the issue, but there is a lot of conflict on the web as to whether or not it is ok to use LocalDB in production, so if you have a lot riding on your project you might want to take a look at that. For my purpose, LocalDB is just fine, so this solved the issue. Thank you to all who responded to my (admittedly) broad question. I'm sure this will be a useful thread for others with the same issue.

Why does my application have redirection issues when the appPool runs under a v2.0 .NET Framework?

I have a web application which has been having a strange issue ever since I moved it to a new server. Users will be able to use the application for some time, but after a few page requests, they will be redirected to the default page and asked to log in again. For some reason, this issue occurs less and less the more the application is used. The issue then starts occurring again over night. The application was formerly running on a windows 2003 server and it worked fine there, so I believe the issue has something to do with the settings on the new server.
I am currently running the application on a windows 2008 server with IIS 7.
I looked through a bunch of different settings in IIS and changed many different things, but none of them seemed to solve the problem. But today, I tried changing the application pool to run under a v4.0 .NET Framework, and that seemed to solve the problem. The application pool formerly ran under a v2.0 .NET Framework.
I do not understand how changing the framework solved my problem. I do not see any connection between the .NET Framework version and my application redirecting to the default page.
Can anybody explain how / why this change in settings solved my issue? Any insight or help would be greatly appreciated.
Thank you

“allowDefinition='MachineToApplication' beyond application level” error on after deployment (following up)

This is a follow up question to the one I asked yesterday. I got a reply and implemented the same but no luck. I am totally not able to understand where I am going wrong, and why isn't it working. Can someone please help me? It's working locally via ASP.NET Web Development Server, but not via IIS (locally or when trying to deploy). Also, why does server matter so much?
Please note that its a website, and not a web application. Thanks a lot in advance.
Probably your application is targeted to .NET 4.0 while app pool to .NET 2.0.

Recreate DefaultWebsite on IIS7 / Windows Web Server 2008

I have accidently deleted the default-website on an "experimental" machine.
It is a standard-installation of "Windows Web Server 2008" with II7 running.
I have already tried to create a custom website on my own, but this always fails when I try to access the website in the browser (remote and locally). There is an endless number of permission- and setting - errors.
Could you please show me a link to a tutorial on what to do in my case?
Or possibly any suggestions what common pitfalls are in such situations?
Thank you!
Daniel Lang
Make sure your site points to %systemdrive%\inetpub\wwwroot, and then it has little difference from the default one.
Learning about how to back up IIS settings on IIS is a must for beginners,
http://mvolo.com/blogs/serverside/archive/2007/03/18/Most-Important-AppCmd-Commands_3A00_-Backing-up-and-restoring-IIS7-configuration.aspx
Save your custom code (virtual directories) and reinstall IIS? Probably cleanest.

Is IIS7 migration a piece of cake

I wish to migrate a website to windows 2008 platform, is there any obvious pitfalls i should be aware of?
code base is c# 3.5,asp.net with ms ajax.
I googled a bit and found this link:
http://weblogs.asp.net/steveschofield/archive/2008/09/04/iis6-to-iis7-migration-tips-tricks.aspx
Biggest Issue i find is that 3rd party components needs to have 64bit version ready to get most of benefits.
I haven't had any experience with a migrated application not working properly. I've only done a few, but we've tested a number here at work, and they all run great under IIS7.
The only gotcha is that the .NET "Managed Pipeline Mode" is set to "Integrated" by default, which caused problems in some of our applications. Either setting it to "Classic" on your app pool, or switching your application to use the "Classic .NET" app pool should resolve the problem. For some more information about the new pipeine, read about it here.
Oh - and +1 on the wacked-out interface. I want my old IIS6 interface back!
Don't let the wacked user interface put you off (but it will drive you dilly)

Resources