Recently, I've been working on a new WebApplication (c# asp.net MVC 4 with VS 2013) and now is time to deploy it on my company's server (WS 2008 R2 SP1).

The project is working fine under Visual Studio but when I deploy it (IIS 7.5) and go to http://ServerName/MyApplication I got different messages according to the browser :

  • IE : "This page can't be displayed"

  • Firefox : "The page isn't redirecting correctly"

  • Chrome : "This WebPage has a redirect loop."

I've been testing everything I found on google but nothing is working. I activated the failed request tracing too and even if I have a lot of XML files none have error(s) in it.

I'm stuck at this step and I really need to push it on the server... Thank you in advance and have a nice day ! :)



I found the solution and I want to share it with you ! It took time to me to resolve my problem and I hope it'll help you.

First, one of the problems was the AppPool's authorisation with the database. As you can find on google some people go to IIS Manager and modify AppPool's idendity but that can cause some security issues. The right way is to go in SQL Server Management Studio and do as follow :

Connect to your server > Security's folder > Right-click on Connection Click on New Connection > Fill the data

General's part // Type an username (ex: DefaultAppPool if you use it), check SQL Server Authentification and type a secure password. After that, choose your database and your language.

Roles's part // Public is check by default but I'll advice to check sysadmin too.

Mapping's part // Select all the databases you use with your app and for all of them check db_owner and public for the membership (I don't if that the correct term in English).

Et Voilà ! If you have an error like "... name is using wrong character ...", look in Connection's folder. Your user has been created anyway.

The second problem was my connection string. As you know this one need to be different if you want to connect your DefaultConnection to SQL Server. Have a look there (it's really helpfull).

In my situation I finally used a typical connection string for SQL Server with standard security (the first one in the link).

Have a nice day !

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.