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

    Errore accesso in Temporary files

    Salve
    sono hostato su aruba e da ieri ho questo errore sul mio script x generare thumbonails:

    codice:
    The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'. 
    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.Web.HttpException: The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.
    
    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.  
    
    Stack Trace: 
    
    
    [HttpException (0x80004005): The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]
       System.Web.HttpRuntime.SetUpCodegenDirectory(CompilationSection compilationSection) +3474123
       System.Web.HttpRuntime.HostingInit(HostingEnvironmentFlags hostingFlags) +226
    
    [HttpException (0x80004005): The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files'.]
       System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +3426855
       System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +88
       System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +149

    il codice della pagina è il seguente:

    codice:
    <%@ Import Namespace="System.Drawing"%> 
    <%@ Import Namespace="System.Drawing.Imaging"%> 
    <SCRIPT  RUNAT="SERVER"> 
    Sub Page_Load() 
    
       Dim width as Integer = 0 
       Dim height as Integer = 0 
    
       try 
         ' ricava dimensioni dalla richiesta 
         if not Request.QueryString("width") is Nothing Then 
         width = Int32.Parse(Request.QueryString("width")) 
         End if 
         if not Request.QueryString("height") is Nothing Then 
         height = Int32.Parse(Request.QueryString("height")) 
         End if 
    
       catch ex as Exception 
       End Try 
    
       ' ridimensiona l'immagine se specificato 
       Dim immagine as String = Server.MapPath(Request("img")) 
       if Not System.Io.File.Exists(immagine) then 
         immagine = Server.MapPath("/immagini/nondisponibile.jpg") 
       end if 
       
       call ImgRedim(immagine, width, height) 
    
       ' fermo il resto della risposta 
       Response.End() 
    End Sub 
    
    ' Funzione di redim 
    Public Sub ImgRedim(immagine as String, width as Integer, height as Integer) 
       Dim bmp as System.Drawing.Bitmap = CType(System.Drawing.Image.FromFile(immagine), System.Drawing.Bitmap) 
    
       ' c'è da ridimensionare? 
       if width>0 or height>0 then 
         ' se è specificata solo la larghezza, calcola l'altezza 
         if height = 0 Then 
         height = Convert.ToInt32(width / bmp.Width * bmp.Height) 
         End if 
    
         ' (e viceversa) 
         if width = 0 Then 
         width = Convert.ToInt32(height / bmp.Height * bmp.Width) 
         End if 
    
         ' creo la Thumbnail con i parametri impostati 
         Dim miniaturabmp as New System.Drawing.Bitmap(bmp, width, height) 
    
         ' salvo sullo stream di output 
         if immagine.EndsWith(".jpg") Then 
         miniaturabmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg) 
         else 
         miniaturabmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif) 
         end if 
    
         ' pulizia 
         miniaturabmp.Dispose() 
       else 
         ' salvo sullo stream di output 
         if immagine.EndsWith(".jpg") Then 
         bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg) 
         else 
         bmp.Save(Response.OutputStream, System.Drawing.Imaging.ImageFormat.Gif) 
         end if 
       end if 
    
       ' pulizia finale 
       bmp.Dispose() 
    
    End Sub 
    
    </SCRIPT>

    posso "aggirare" l'errore in qualche modo visto che ho il sospetto che aruba continuerà a farlo apparire anche se lo metteranno a posto??
    Vuoi condividere le tue Video, Foto e Musica con tutti i tuoi amici?
    http://www.manyego.com
    Entra a far parte della nostra Community!
    Ti aspettano migliaia di Video e Foto e centinaia di Amici!
    Crea il tuo Blog e personalizzalo con alcuni semplici passi!

  2. #2
    Utente di HTML.it
    Registrato dal
    Aug 2002
    Messaggi
    151
    Ma in quale cartella hai messo la thumbnail?
    la cartella con i permessi necessari è public
    Nelle altre cartelle da te create ti darà sempre errore

  3. #3
    ovviamente è public la cartella...
    Vuoi condividere le tue Video, Foto e Musica con tutti i tuoi amici?
    http://www.manyego.com
    Entra a far parte della nostra Community!
    Ti aspettano migliaia di Video e Foto e centinaia di Amici!
    Crea il tuo Blog e personalizzalo con alcuni semplici passi!

  4. #4
    Utente di HTML.it
    Registrato dal
    Aug 2002
    Messaggi
    151
    Allora avranno configurato male il nuovo framework.
    Come vedi nell'errore c'è
    Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files

    Prova a chiedere spiegazioni ad Aruba

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 © 2026 vBulletin Solutions, Inc. All rights reserved.