When deploying my asp.net website to IIS using Web deploy, my previously configured SMTP settings (in my IIS application) are erased. I know I can set this settings in web.config but i don't want to.
Related
I am trying to run a django website which connects to a SQL Server, using IIS with Windows authentication.
IIS server and SQL server are on different machines under the same domain i.e., iis_machine.example.com and sql_machine.example.com
What I'm trying to achieve:
Impersonate the remote user accessing the django website hosted on
IIS, so his Windows credentials are passed to SQL Server for
authentication.
What I tried so far:
Added this to my web.config file for impersonation
<system.web>
<identity impersonate="true" />
</system.web>
Enabled Windows authentication and set up Application Pool (django_web) for django website as shown below
This is what my Authentication for django website looks like in IIS
This is what my Application Pool for django website looks like in IIS
Added IIS APPPOOL\django_web to SQL Server Security\Logins
Result:
When I access the django website, IIS prompts the user for his
Windows credentials and I can successfully login
If user tries to access SQL Server after logging in
Case a. IIS, SQL Server are on the different machines: SQL server authentication fails with
"Login failed for user 'domain\MACHINENAME$'
Case b. IIS, SQL Server are on the same machine, SQL server authentication is successful but authentication credentials used are IIS APPPOOL\django_web not domain\remote_user
I understand that there is some Kerberos trickery involved with this setup. Unfortunately, I'm only a programmer and not very familiar with how Kerberos works. If someone experienced in this domain, could shed some light on how this setup would work, that'd be really appreciated. Thanks!
I am using:
IIS 10 SQL
Server 2014
django 2.0.7
Python 3.6.5
Windows 8/10
I got some information form restart website in IIS when changing values in the appSettings of the web.config so now I know IIS will restart the application poll not website.
As I know when I update the web.config the IIS would restart the application pool but sometimes I didn't update the web.config but after my deploy the website seems like be restarted. Why? because I update the website.dll or some other reason and how does IIS works to know the dll was updated and it should use the new dll to serve the user?
Create/Update/Delete files under below folders will cause IIS recycle the app pool:
Bin
App_GlobalResources
Global.asax
App_Code
App_WebReferences
Web.config
Some resources:
https://blogs.msdn.microsoft.com/tmarq/2007/11/01/asp-net-file-change-notifications-exactly-which-files-and-directories-are-monitored/
https://webmasters.stackexchange.com/questions/77322/update-net-website-without-reloading
https://shazwazza.com/post/all-about-aspnet-file-change-notification-fcn/
ASP.net C# requires IIS restart when new DLL copied to BIN directory
I am working on a DotNetNuke module and I need to put some settings in its web.config. So far I was using IIS Express for my development environment and everything was working fine.(The module has a web.config in its folder and it can read its settings from there while it's hosted on IIS Express)
Now I am testing my module on a DNN that is hosted on IIS and the module can't find it's settings ( It seems that IIS doesn't look at web.config files in other folders rather that its main web.config)
The question is how should I configure IIS so that my module can access its web.config in its folder ?
Yes, in IIS you'll have to convert your folder to an application (right-click on that folder), that will create a new AppDomain root and be using a different global.asax, bin folder and web.config.
I have an http handler that saves files on a remote location. For doing this I need specific permissions and the entire application is configured to work with impersonation (web.config setting)
This works perfect for all the pages (some other pages also needs the same specific permissions) but the impersonation is not working for http handlers, it simply doesn't impersonate.
This works perfect on IIS6 but not on IIS7. The application pool mode is classic
Why impersonate for file io permissions, that is what app pool identity is for? Set your handler's app pool's identity to a user that has permission to do the IO.
Specify an Identity for an Application Pool (IIS 7)
Configuring Application Pool Identity with IIS 6.0 (IIS 6.0)
I have an ASP MVC application installed on IIS 7.5.
I have specified the app pool identity to be a domain service account.
The application has anonymous authentication disabled and windows authentication enabled.
The domain service account has full access to a set of files on the server that I want to access from ASP.
When I try and access the files from the ASP application I get an error, "access to the path ... is denied.".
I can only get this to go away by giving the windows user account access to the files. What I want to do is just give the service account access to the files.
Impersonation is disabled in the web.config via <identity impersonate="false" />
How can this be achieved?
Have you tried disabling ASP.NET Impersonation?
If you are trying to access files locally on the server, try to use the LocalSystem account for your app-pool identity.