Visualizzazione dei risultati da 1 a 7 su 7
  1. #1

    Problema FileUpload sul server

    Salve a tutti,
    in locale riesco a far salvare il file nella cartella ma sul server su internet no, mi esce quest'errore:

    codice:
    Access to the path 'D:\Inetpub\webs\accelerautocom\img_default\head_site.jpg' is denied. 
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
    
    Exception Details: System.UnauthorizedAccessException: Access to the path 'D:\Inetpub\webs\accelerautocom\img_default\head_site.jpg' is denied. 
    
    ASP.NET is not authorized to access the requested resource. Consider granting access rights to the resource to the ASP.NET request identity. ASP.NET has a base process identity (typically {MACHINE}\ASPNET on IIS 5 or Network Service on IIS 6) that is used if the application is not impersonating. If the application is impersonating via <identity impersonate="true"/>, the identity will be the anonymous user (typically IUSR_MACHINENAME) or the authenticated request user. 
    
    To grant ASP.NET access to a file, right-click the file in Explorer, choose "Properties" and select the Security tab. Click "Add" to add the appropriate user or group. Highlight the ASP.NET account, and check the boxes for the desired access.
    
    Source Error: 
    
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Il codice dell'evento in locale funziona ma sul server mi da l'errore riportato sopra.

    codice:
            fuTOP.SaveAs(Request.PhysicalApplicationPath.ToString() + "/img_default/head_site.jpg");

  2. #2
    La cartella 'D:\Inetpub\webs\accelerautocom\img_default' non ha i permessi di scrittura abilitati.

    Devi correggere aggiungendo permesso di scrittura allo stesso utente che utilizza l'AppPool.

  3. #3
    Originariamente inviato da Gluck74
    La cartella 'D:\Inetpub\webs\accelerautocom\img_default' non ha i permessi di scrittura abilitati.

    Devi correggere aggiungendo permesso di scrittura allo stesso utente che utilizza l'AppPool.
    Se provo con D:\Inetpub\webs\accelerautocom\Public ? Dovrebbe essere sempre publica credo

  4. #4
    ma il server è configurabile, oppure hai un hosting tipo aruba?

  5. #5
    Originariamente inviato da Gluck74
    ma il server è configurabile, oppure hai un hosting tipo aruba?
    si ho aruba.

    COn la cartella public funziona comunque

  6. #6
    Confermo, con aruba hai una e unica cartella settata con i permessi per poter scrivere, ed è proprio la "public".
    Non hai altra scelta che usare quella

  7. #7
    Originariamente inviato da Gluck74
    Confermo, con aruba hai una e unica cartella settata con i permessi per poter scrivere, ed è proprio la "public".
    Non hai altra scelta che usare quella
    mi accontennto per ora L'importamte che funzioni

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.