Sreenath G

Sreenath G

  • NA
  • 233
  • 304.1k

Button not getting disabled after deploying site in IIS 7

May 23 2011 8:48 AM
 

 

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


Answers (27)