954,577 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

how to change the application's trust level in the configuration ...

Hai,

In the below code I am deleting a file from client pc

Dim fs
                    fs = Server.CreateObject("Scripting.FileSystemObject")
                    'If fs.FileExists(upfile.PostedFile.FileName) Then
                    fs.DeleteFile(upfile.PostedFile.FileName)
                    'End If


In the Web.config file, I have configured the trust level also. :

<configuration>
 <system.web>
    <identity impersonate='true'/>
  </system.web>

  <location allowOverride="true">
  <system.web>
<trust level="Full" originUrl="" />
</system.web>
</location>
....


BUt while running the application, it is giving the following error. How to change security settings?Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED
).

Thanks

Seetha

asp_seetha
Newbie Poster
7 posts since Oct 2008
Reputation Points: 10
Solved Threads: 0
 

Hai,

In the below code I am deleting a file from client pc

Dim fs
                    fs = Server.CreateObject("Scripting.FileSystemObject")
                    'If fs.FileExists(upfile.PostedFile.FileName) Then
                    fs.DeleteFile(upfile.PostedFile.FileName)
                    'End If

In the Web.config file, I have configured the trust level also. :

<configuration>
 <system.web>
    <identity impersonate='true'/>
  </system.web>

  <location allowOverride="true">
  <system.web>
<trust level="Full" originUrl="" />
</system.web>
</location>
....

BUt while running the application, it is giving the following error. How to change security settings?Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file. Exception Details: System.Security.SecurityException: Exception from HRESULT: 0x800A0046 (CTL_E_PERMISSIONDENIED).

Thanks

Seetha

http://msdn.microsoft.com/en-us/library/tkscy493.aspx

atiq_bcs
Newbie Poster
1 post since Apr 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You