You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even it is a great template to start but I have noted a bug that I could not fix till now.
When I deploy the application to IIS it do not work.
(yourhost) refused to connect.
When we publish in release mode from visual studio the debug is false in web.config. <compilation debug="false" targetFramework="4.5.1" />
or <compilation targetFramework="4.5.1" />
Application do not load in this mode.
If I change the debug mode as <compilation debug="true" targetFramework="4.5.1" />
Everything work fine.
I want to run the application with debug=false in web.config.
I could not found any solution. Can anyone help?
The text was updated successfully, but these errors were encountered:
Finally I have found the solution myself.
Under App_Start Folder you can find AuthConfig.cs file.
It has two functions:
RegisterMVCAuth
RegisterWebApiAuth
Here we are adding a filter filters.Add(new RequireHttpsAttribute());
It will only add filter when your site is running in release mode debug="false" in web.config.
If you want to run your website on a server where there is not SSL installed.
Just change these functions.
//Require Https always
if (!HttpContext.Current.IsDebuggingEnabled)
{
filters.Add(new RequireHttpsAttribute());
}
This filter is only added when site is running in release mode. So you can comment out or remove these lines of code. Your site will be running properly without ssl.
Even it is a great template to start but I have noted a bug that I could not fix till now.
When I deploy the application to IIS it do not work.
(yourhost) refused to connect.
When we publish in release mode from visual studio the debug is false in web.config.
<compilation debug="false" targetFramework="4.5.1" />
or
<compilation targetFramework="4.5.1" />
Application do not load in this mode.
If I change the debug mode as
<compilation debug="true" targetFramework="4.5.1" />
Everything work fine.
I want to run the application with debug=false in web.config.
I could not found any solution. Can anyone help?
The text was updated successfully, but these errors were encountered: