Hi,
I have deployed my site on IIS 7 server. At certain conditions I want to disable one button. This is working at my local but after deploying it in IIS, it is not working. Here is my code.
protected void Page_Load(object sender, EventArgs e)
{
try
{
lFnEnabledisableServiceAuthentication();
}
catch (Exception)
{
}
}
void lFnEnabledisableServiceAuthentication()
{
try
{
string lStrUsers = "";
string lStrCurrentUser = "";
lStrUsers = ConfigurationManager.AppSettings["ServiceAuthUsers"].ToString();
lStrCurrentUser = clsGlobals.Prp_clsGlobals.mFnUpdateHostUser();
if (lStrUsers.Trim().ToLower() == lStrCurrentUser.Trim().ToLower())
{
btnInovisService.Enabled = true;
}
else
{
btnInovisService.Enabled = false;
}
}
catch (Exception)
{
throw;
}
}
<appSettings >
<add key="ServiceAuthUsers" value="MyaccountName"/>
appSettings>
Any suggestions like why this is happening..
Thanks
Sreenath
Sreenath GPosted May 31, 2011, 3:39 AM
http://www.c-sharpcorner.com/Forums/Thread/123890/site-deployed-in-iis-7-is-always-asking-for-username-and-pas.aspx
any remedy to get rid of this credential request...?
Posted May 26, 2011, 12:47 AM
Does the same application is working fine in Windows 7 also?
If possible , can you attach the setting of IIS 6 and IIS 7 ? So that we can easily compare the settings between two version of IIS.
Sreenath GPosted May 26, 2011, 12:40 AM
Mahesh ChandPosted May 25, 2011, 2:26 PM
Suthish NairPosted May 25, 2011, 2:22 PM
Sreenath GPosted May 25, 2011, 11:15 AM
<
authentication mode="Windows" />Posted May 25, 2011, 8:25 AM
Sreenath GPosted May 25, 2011, 8:22 AM
Posted May 25, 2011, 8:19 AM
Sreenath GPosted May 25, 2011, 4:35 AM
But how can I remove site from asking credenials..?
Sreenath GPosted May 25, 2011, 4:17 AM
Sreenath GPosted May 25, 2011, 4:16 AM
Posted May 25, 2011, 3:44 AM
Check the same AppPool identity value in IIS 6.0 and your location machine also.
If it is different, then you are reached the solution.
Sreenath GPosted May 25, 2011, 3:23 AM
Posted May 25, 2011, 3:17 AM
IIS-->Application Pools-->Right Click on your AppPool-->Advanced Settings--> Under Process Model check the Identity value.
Sreenath GPosted May 25, 2011, 3:08 AM
Suthish NairPosted May 24, 2011, 5:39 AM
How To Deploy ASP.Net Web site Content on IIS 7.0
Deploying ASP.NET Websites on IIS 7.0
Sreenath GPosted May 24, 2011, 5:26 AM
Suthish NairPosted May 24, 2011, 5:01 AM
Sreenath GPosted May 24, 2011, 4:58 AM
Posted May 24, 2011, 1:32 AM
In the physical path settings( IIS 7-->Right Click -->manage web site-->Advanced Settings-->PhysicalPath Settings) have you configured Application user or Specific user ? Which option you have used ?
Sreenath GPosted May 24, 2011, 1:18 AM
Suthish NairPosted May 23, 2011, 1:42 PM
Posted May 23, 2011, 9:42 AM
System.Web.HttpContext.Current.User.Identity.Name.Split("\\".ToCharArray())[1].Trim();
Check the value of PhysicalPath settings in IIS 7.
Go to the Site in IIS 7-->Right Click -->manage web site-->Advanced Settings-->PhysicalPath Settings--?
Hope this helps you.
Sreenath GPosted May 23, 2011, 9:03 AM
Sreenath GPosted May 23, 2011, 9:02 AM
Posted May 23, 2011, 8:58 AM
Try to hard-code value for the true part check it once...