Sumith Asanka 0 Light Poster

Hi Guys

I have an asp.net application developped using C# asp.net 4.0 , It is running perfectly with
.net inbuilt server , but it throws an exception when running on IIS server 5.1 (Win XP sp-3)

There i have a connection string encryption method , that is the place it throws the exception
any body no an idea to sort out this issue

private void EncryptConnstring()
    {
        Configuration config = WebConfigurationManager.OpenWebConfiguration("~");
        ConnectionStringsSection constrsec = (ConnectionStringsSection)config.GetSection("connectionStrings");
        constrsec.SectionInformation.ProtectSection("DataProtectionConfigurationProvider");
        config.Save();

    }`




<configuration>
  <connectionStrings configProtectionProvider="DataProtectionConfigurationProvider">
    <EncryptedData>
      <CipherData>
        <CipherValue>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAA/UYu3PJMHE+dbcAnqpdQZQQAAAACAAAAAAADZgAAqAAAABAAAABfRyTE1R2Qx1TfIRfGIRC+AAAAAASAAACgAAAAEAAAAADBnHaL/dOqgKh1L/imlIuIAQAAlajBlxThs+ygnm7Y0dmb6o9p5PWzb6Vyc8f6KEFAJPJgfCmKjUz/ak2VafQRFfFZYMWiIcs38FeXhl5JtRg1A+Wll/Kh6cOJK+fjKS4UTJ6+nWY6UfnFZzlJUqMfIGIyyRfkzAxNobBpY08SVCNPwwSDizYMXLSnIVaE3b2VHK2o8IW/Rl1p8N4QDltFgeqFuNX8ysqnphpf4MHJuEE/MHpN5RV9zqSfpN6FCEcqseaWI7r5BsXaZn32uR8RKV6zAIAzjSF6Nl/wFUalouu/PDJEouP7yJjs74bjgsJVkZoVSHVnfybrcsyClly1CoIevnG4DwbGHLlGQbKOYtDmzR9uA6LGZqnL3im9OjxqvNG8k7B07LZrmITCBcdaK6uKNBQpjRuSFN6G9nFl/CL7yk+epL9QWF9SS7Z2IEZ9cr2EI1pJ2XcyP7cWJbkzAyzvGivwFTFwwrGkXMkMmNdKAcQhKDGmkLAcpk6v0fExY2uvrOn8RvvfH86hpnSO+08VNauTC4NprtcUAAAAHSPGE+6ROzfqNi8ZaCo01o3yRWA=</CipherValue>
      </CipherData>
    </EncryptedData>
  </connectionStrings>

thanks
regards
sumith

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.