Azure Website Exception: Format of the initialization string does not conform to specification starting at index 0

前端 未结 3 1391
执笔经年
执笔经年 2021-01-12 04:53

I have an Azure Website that I use to host my MVC + Entity Framework project. When I run the site locally using the same connection to my SQL Azure database, everything wor

3条回答
  •  不知归路
    2021-01-12 05:45

    By some research around this, I found out the error occurs in the following possible cases :

    Possibility 1: You are probably using the wrong DbConnection class. If you are using Access then make sure you use OleDbConnection, not SqlConnection ... and vice versa.

    Possibility 2: It indicates that the issue is in some way database related, But the issue is linked to the APP POOL identity way of running web sites on IIS. There is some background on what this means here in Application Pool Identities. We have noticed that we tend not to see the issue on sites which are configured in the more old fashioned way, which is to create a new 'IUSR' user account on the server, then add this user to the IIS users group, and then set the site to use this user rather than the APP POOL identity. Ensure the password expiry issue is sorted on your main admin account on the server. And if this does not resolve the issue, to create a new 'IUSR' Windows user account, and set the site up to use this rather than the APP POOL identity. On shared hosting, this may not be possible, but dealing with the admin password expiry is something the host may still be able to address.

提交回复
热议问题