Help w/ CryptographicException Error

Discussion in 'ASP .Net Web Services' started by MCP, Oct 1, 2007.

  1. MCP

    MCP Guest

    I am running code that requires a local certificate to connect to a web
    service (XML-RPC). The code works fine when I run it in Visual Studio Express
    2005; however, when I run it on Visual Web Developer, I get the following
    error:

    System.Security.Cryptography.CryptographicException was unhandled by user code
    Message="Access is denied.
    "
    Source="mscorlib"
    StackTrace:
    at
    System.Security.Cryptography.CryptographicException.ThrowCryptogaphicException(Int32 hr)
    at
    System.Security.Cryptography.X509Certificates.X509Utils._QueryCertFileType(String fileName)
    at
    System.Security.Cryptography.X509Certificates.X509Certificate.LoadCertificateFromFile(String fileName, Object password, X509KeyStorageFlags keyStorageFlags)
    at
    System.Security.Cryptography.X509Certificates.X509Certificate.CreateFromCertFile(String filename)
    at Default2.Page_Load(Object sender, EventArgs e) in
    c:\inetpub\wwwroot\MobObject\Default2.aspx.vb:line 14
    at System.Web.UI.Control.OnLoad(EventArgs e)
    at System.Web.UI.Control.LoadRecursive()
    at System.Web.UI.Page.ProcessRequestMain(Boolean
    includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
     
    MCP, Oct 1, 2007
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZnJlcXVuZW5jeQ==?=

    CryptographicException Bad Data in Windo

    =?Utf-8?B?ZnJlcXVuZW5jeQ==?=, Jul 20, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    809
    =?Utf-8?B?ZnJlcXVuZW5jeQ==?=
    Jul 20, 2005
  2. muthu
    Replies:
    1
    Views:
    721
    Winista
    Jul 10, 2006
  3. Brad
    Replies:
    1
    Views:
    1,883
    Steven Cheng[MSFT]
    Aug 30, 2006
  4. Brent K
    Replies:
    2
    Views:
    859
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Jul 12, 2007
  5. Amelyan
    Replies:
    0
    Views:
    828
    Amelyan
    Aug 12, 2007
  6. jaekim

    CryptographicException: Bad Data

    jaekim, Sep 6, 2003, in forum: ASP .Net Security
    Replies:
    3
    Views:
    389
    jaekim
    Sep 7, 2003
  7. pmkatz
    Replies:
    0
    Views:
    552
    pmkatz
    Aug 25, 2004
  8. z f
    Replies:
    0
    Views:
    278
Loading...