CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > windows_hosting.hosting_open_forum Tags:
Item Type: NewsGroup Date Entered: 2/29/2008 2:47:03 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 16 Views: 33 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
17 Items, 1 Pages 1 |< << Go >> >|
danmbuen
Asp.Net User
Failed to upload files with GoDaddy Windows Hosting2/29/2008 2:47:03 AM

0/0

My ASP.NET application uses a 'FileUpload' control to allow a user to upload files.  I already set the 'Write' permission of the destination folder using GoDaddy's Control Panel > File Manager but I catch this error:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. mscorlib
 
This is my code:
 
s_FilePath = d:\hosting\myacoount\folder1\subfolder1\filename
 Me.FileUpload1.SaveAs(s_FilePath + fileinfo.Extension.ToString) 
 
I already emailed their support but it gives me the same answer... Anyone who have experienced like this, any tips?  Thanks :) 

 

walling
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting2/29/2008 3:40:58 AM

0/0

This might be of help: http://www.velocityreviews.com/forums/t295686-fileiopermission-erro-using-referenced-dll-on-shared-hosting.html.

But I think you are having a medium vs. full trust issue. I haven't hosted with GoDaddy, but I've heard from a few web software vendors that their packages don't work on GoDaddy because of .NET trust issues. Not sure if there is a workaround.
 


--
Rob Walling
ASP.NET MVP
My blog, Software by Rob

Please click "Mark as Answer" if my post helped you.
amritrr
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting2/29/2008 7:42:13 PM

0/0

It definately seems like a permissions issue to me. What is the answer that Godaddy's support has provided you?

 


----------------------------------
Amrit Ray
Windows Web Hosting | Reseller Hosting | Web Design Service
danmbuen
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/1/2008 12:07:24 AM

0/0

These are the instructions that they gave me...  

 To modify Windows permissions using the File Manager:

1. Log in to your Account Manager.

2. In the My Products section, select Hosting Account List.

3. Next to the hosting account you want to modify, click Open.

4. In the Content section, click File Manager.

5. Select the directory or directories for which you'd like to set permissions.

6. Click the Permissions icon.

7. Select the permissions for the selected files.

Read
Selecting "Read" enables anonymous users to view files in the directory through a Web browser.
Deselecting "Read" presents users of your Web site that reference files in the directory with a security challenge. To view the files, users must authenticate into the hosting account by entering the FTP user name and password.
NOTE: You must select the "Anonymous Access" setting in the IIS Settings for a page in the directory to be viewable through a Web browser.

Write
Selecting "Write" enables anonymous users to use your site's applications to modify the contents of a directory. Select "Write" only if your site's applications create files or write to files in the directory.

Inherit
Selecting "Inherit" removes the explicit "Read" and "Write" permissions on a directory, so it inherits its parent directory's permissions. When a directory inherits permissions from its parent, the directory's permissions are dynamically updated when the parent's permissions are updated. Deselecting "Inherit" applies the explicit "Read" and "Write" permissions to the directory. When a directory does not inherit permissions from its parent, the directory's permissions are unaffected by updates to the parent's permissions.

Reset all children to inherit
Selecting "Reset all children to inherit" causes the "Inherit" setting to be cascaded to all of the subdirectories below the directory. This condition has the affect of removing any explicit permissions that may have been set.

8. Click OK

I already set the permission to "Write" and "Read" for the folder/directory to be uploaded with files but still no luck. 

kilko
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/1/2008 2:25:07 AM

0/0

If you have already set the permissions and it is not working, contact the support team and ask them to check and apply the permissions manually from the server.


-Kilko
Happily Hosting with Softsys Hosting & DiscountASP
wisecarver
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/1/2008 3:40:32 PM

0/0

ASP.NET developers using GoDaddy servers were reporting last fall that they found Medium Trust was strictly running on the servers.

 

DotNetPark
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/2/2008 2:55:36 PM

0/0

Strange, GoDaddy's support is useless, but people still use their service. What is the reason?


Reliable ASP.NET, MS SQL 2005/2000 web hosting since 2003. ASP.NET 3.5 + MS SQL 2005 hosting starting at $8.30/mo.!
danmbuen
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/3/2008 3:54:46 AM

0/0

Finally my application was able to upload files, but I realized that the location of the folder that allows my application to upload files should be located under my application root (the folder where my website is located), other than that it is impossible and this is strange since I try to set the permission of my desired upload folder similar to the application root. 

 
There support is so lousy that I am better off finding answers in forums, blogs and other asp.net sites.  It seems that most of their supports do not even know what they are talking about.

 

Thanks for the replies guys! :) 

corbybender
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/10/2008 2:19:18 AM

0/0

 danmbuen, I am having the exact same issue but have not figured it out.  Can you please give me some more detail?  My File Uploader works if I don't set the web.config file to impersonate....basically it prompts me for my FTP login and password and then it works...but I don't want users to have to do this....so could you post how you set up your web.config file and tell me exactly where you have your .aspx file with the upload control and the directory (and setup of said directory) that catches the uploads?  Thanks so much in advance.

-Corby- 


Code Monkey like Fritos. Code Monkey like Tab and Mountain Dew. Code Monkey very simple man, with big warm fuzzy secret heart: Code Monkey like you. - Jonathan Coulton "Code Monkey" http://www.jonathancoulton.com
corbybender
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/10/2008 1:19:34 PM

0/0

...Also, I don't see a Permissions Icon on the GoDaddy "File Manager" screen.  Can someone point me in the right direction pls?

No Permissions icon n GoDaddy 


Code Monkey like Fritos. Code Monkey like Tab and Mountain Dew. Code Monkey very simple man, with big warm fuzzy secret heart: Code Monkey like you. - Jonathan Coulton "Code Monkey" http://www.jonathancoulton.com
wisecarver
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/10/2008 2:05:21 PM

0/0

If they're allowing developers to change the trust level won't that still be done in the root web.config?

corbybender
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/10/2008 2:18:33 PM

0/0

This is why I am asking danmbuen to post his web.config file so I can see how he set up his identity to impersonate his login.  Everything I tried didn't work and I still don't have a permissions icon under the GoDaddy File Manager oas danmbuen's post above states there should be...

This Image Upload (for a user's avatar) is the final stumbling block for my project.  I don't want to have to switch hosting and re-set everything up somewhere else all because I can't figure out how to get the File Uploader to write an image to GoDaddy hosting.

Danmbuen, please could you post your web.config (or at least the portion specific to getting the identity / upload to work)?  I would really appreciate it.
 


Code Monkey like Fritos. Code Monkey like Tab and Mountain Dew. Code Monkey very simple man, with big warm fuzzy secret heart: Code Monkey like you. - Jonathan Coulton "Code Monkey" http://www.jonathancoulton.com
[email protected]
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/10/2008 2:27:02 PM

0/0

danmbuen:
There support is so lousy that I am better off finding answers in forums, blogs and other asp.net sites. 

Or, finding support from your new hosting company, one that has decent support.

Jeff


Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
wisecarver
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/10/2008 5:26:33 PM

0/0

Note: I use GoDaddy for my domains but my hosting for the domains is with discountasp.net

From what I've been able to discover you will not be able to climb above Medium trust on your GoDaddy account.

http://help.godaddy.com/article/1039
Recently Updated: March 5, 2008 4:44 PM

Trust level refers to permissions set in the Web.config file that dictate what operations can and cannot be performed by Web applications. Our ASP.NET 3.5 shared hosting servers use the default Medium trust level with the addition of OleDbPermission, OdbcPermission, and a less-restrictive WebPermission.

Applications operating under a Medium trust level have no registry access, no access to the Windows event log, and cannot use ReflectionPermission (but can use Reflection). Such applications can communicate only with a defined range of network addresses and file system access is limited to the application's virtual directory hierarchy.

Using a Medium trust level prevents applications from accessing shared system resources and eliminates the potential for application interference. Adding OleDbPermission and OdbcPermission allows applications to use those data providers to access databases. WebPermission is modified to allow outbound http and https traffic.

Fortunately GoDaddy provides you with girls to overcome the frustration: http://www.godaddygirls.info

Also recommend you take a look at Rick Strahl's article:
Running ASP.NET in Medium Trust
http://west-wind.com/weblog/posts/6344.aspx

Salute,
  Mark

corbybender
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/10/2008 5:45:31 PM

0/0

I've heard good things about discountasp.net, such as that they let you connect to your SQL tables with VS 2005 so you can drop on an SQL connection, drop on a grid, configure the SQL connection right from within visual studio, and test live data...THAT is definately something I wish GoDaddy would allow.

I am not apposed to switching hosting, but would just prefer to avoid the hassle.  The guy above said he got his to work on GoDaddy...I just want to know exactly how he did it! 
 


Code Monkey like Fritos. Code Monkey like Tab and Mountain Dew. Code Monkey very simple man, with big warm fuzzy secret heart: Code Monkey like you. - Jonathan Coulton "Code Monkey" http://www.jonathancoulton.com
danmbuen
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/12/2008 3:39:46 AM

0/0

 sorry for the late reply, this is my web.config:

 

<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
    <appSettings/>
  <connectionStrings>

    <add name="Personal" connectionString=" Server=p3swhsql-v09.shr.phx3.secureserver.net; Database=databasename; User ID=userid; Password=password; Trusted_Connection=False" providerName="System.Data.SqlClient" />
    <remove name="LocalSqlServer"/>
    <add name="LocalSqlServer" connectionString=" Server=p3swhsql-v09.shr.phx3.secureserver.net; Database=databasename; User ID=userid; Password=password; Trusted_Connection=False" providerName="System.Data.SqlClient" />
   
   
  </connectionStrings>
  <!--<location allowOverride="true">-->
   
 
 
    <system.web>
   
   
        <!--
            Set compilation debug="true" to insert debugging
            symbols into the compiled page. Because this
            affects performance, set this value to true only
            during development.

            Visual Basic options:
            Set strict="true" to disallow all data type conversions
            where data loss can occur.
            Set explicit="true" to force declaration of all variables.
        -->
    <!--<securityPolicy>
      <trustLevel name="Full" policyFile="internal" />
      <trustLevel name="High" policyFile="web_hightrust.config" />
      <trustLevel name="Medium" policyFile="web_mediumtrust.config" />
      <trustLevel name="Low" policyFile="web_lowtrust.config" />
      <trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
    </securityPolicy>
   
    <trust level="Full" originUrl="" processRequestInApplicationTrust="true"/>-->
       
    <compilation debug="true" strict="false" explicit="true"/>
        <pages>
            <namespaces>
                <clear/>
                <add namespace="System"/>
                <add namespace="System.Collections"/>
                <add namespace="System.Collections.Specialized"/>
                <add namespace="System.Configuration"/>
                <add namespace="System.Text"/>
                <add namespace="System.Text.RegularExpressions"/>
                <add namespace="System.Web"/>
                <add namespace="System.Web.Caching"/>
                <add namespace="System.Web.SessionState"/>
                <add namespace="System.Web.Security"/>
                <add namespace="System.Web.Profile"/>
                <add namespace="System.Web.UI"/>
                <add namespace="System.Web.UI.WebControls"/>
                <add namespace="System.Web.UI.WebControls.WebParts"/>
                <add namespace="System.Web.UI.HtmlControls"/>
            </namespaces>
        </pages>
        <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
    <!--    <authentication mode="Windows"/>         -->             <!--

            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
    <httpRuntime  maxRequestLength="10000" executionTimeout="1000"/>
    <customErrors mode="Off" />
    </system.web>

  <!--</location>-->
 
</configuration>
 

 

If you do cant see the permission configuration maybe the account you used logging in your GoDaddy account is limited... 

corbybender
Asp.Net User
Re: Failed to upload files with GoDaddy Windows Hosting3/13/2008 7:04:56 PM

0/0

danmbuen:
<!--<securityPolicy>
      <trustLevel name="Full" policyFile="internal" />
      <trustLevel name="High" policyFile="web_hightrust.config" />
      <trustLevel name="Medium" policyFile="web_mediumtrust.config" />
      <trustLevel name="Low" policyFile="web_lowtrust.config" />
      <trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
    </securityPolicy>
 

I am not sure what is going on here.  Can you explain?  You have 3 alternative config files?  Which one (and how) are you using this with the FileUpload control?

Thanks again! 


Code Monkey like Fritos. Code Monkey like Tab and Mountain Dew. Code Monkey very simple man, with big warm fuzzy secret heart: Code Monkey like you. - Jonathan Coulton "Code Monkey" http://www.jonathancoulton.com
17 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

ng.asp-net-forum.windows_hosting-hosting_open_forum - Web Programming ... Windows Home Server. 14. 12. 4/13/2008 7:02:12 PM. Go Daddy Host and new to asp ... Failed to upload files with GoDaddy Windows Hosting. 16. 14. 3/13/2008 7:04:56 PM ...
Failed to upload files with GoDaddy Windows Hosting - ASP.NET Forums Failed to upload files with GoDaddy Windows Hosting. Last post 07-04-2008 5:28 AM by danmbuen. ... Re: Failed to upload files with GoDaddy Windows Hosting. 03 ...
Hosting Open Forum - ASP.NET Forums Failed to upload files with GoDaddy Windows Hosting. by danmbuen. Re: Failed to upload... Current experiences with mosso.com hosting? by gavinharriss. Re: ...
My hosting site gets the error "Value 7 Failed to write file to disk ... To upload large files, this value must be larger than upload_max_filesize. ... "Is godaddy.com the best place to buy a domain from? ...
Installation tips for GoDaddy or failed installs because of server ... ... hosting with GoDaddy , you basically get a folder on their server with 5 files in it. ... hosting manager to make sure that are not using Windows hosting. ...
Using Moodle: can't upload files I'm using a deluxe linux hosting account at Godaddy. ... u/k/p/ukplanet/html/ecampus/moodledata/2/APG-IdentifyProcesses.doc): failed ...
Image Upload on Godaddy - dashCommerce To modify Windows permissions using the File Manager: 1. Log in to your ... To view the files, users must authenticate into the hosting account by entering ...



 
All Times Are GMT