Re: Security Exception Thrown under .NET 2.0 Medium Trust While Uploading Files/Media

  •  08-17-2006, 11:56 AM

    Re: Security Exception Thrown under .NET 2.0 Medium Trust While Uploading Files/Media

    Jamie,
     
    What we are dealing with is not a CuteEdtior issue.
     
    It's about Upload Files Using ASP.NET Impersonation and UNC Share.
     
    Your situation:
     
    The Image Gallery Path is a virtual folder located in a remote machine other than the local web server. The uploaded files needs to be stored in this remote location and mapped to the web server using a virtual folder pointing to a UNC share.
    The problem happens when we try to upload a file using this virtual folder pointing to UNC share. Local ASPNET account does not have access to the network resources by default.
     
    Solution:
     
    So we have to impersonate to access this remote resource. If you have a domain account, please check the above article. If not, please follow the steps below:
     
    1. Create a local user account in local web server. UserName: myUNC_user, password: whatever.
     
    2. Create a local user account in remove web server. UserName: myUNC_user, password: whatever. Please note that this account has the same username and password as the local account.
     
    3. Give full control permission for impersonated user on .....Microsoft.NET\Framework\v2.0.50727.42\Temporary folder.
     
    Please try the above solution and create a simple upload file to test it.
     
    Keep me posted
     
     
     
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

    Filed under:
View Complete Thread