Newsgroup: it.comp.www.asp
Titolo: [.net] runtime error: non so che fare

ho appena installato il fw .NET sul serverotto di casa (w2k).
provando una aspx con GDI+ (l'esempio
http://www.aspitalia.com/liste/usag/script.aspx?ID=379
) il server mi
restituisce un errore runtime.
che significa?
---
Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom
error settings for this application prevent the details of the application
error from being viewed remotely (for security reasons). It could, however,
be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable
on remote machines, please create a <customErrors> tag within a "web.config"
configuration file located in the root directory of the current web
application. This <customErrors> tag should then have its "mode" attribute
set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
Notes: The current error page you are seeing can be replaced by a custom
error page by modifying the "defaultRedirect" attribute of the application's
<customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
---
sp-


Moderatore di it.comp.www.asp - Microsoft .NET MVP
http://www.aspitalia.com/
 Enjoy the .NET community!
http://www.dev2dev.it/
 La rete ha connesso nuove particelle!
http://www.extensible.it/
 XML and beyond

 in questo modo potrai vedere i dettagli dell'errore.
:-)) grazie, lě per lě credevo che il termine "web.config" non fosse
specifico di un file ma di un termine tecnico :-))))
adesso vedo che l'errore č dovuto a questo:
Server Error in '/' Application.
Compilation Error
Description: An error occurred during the compilation of a resource required
to service this request. Please review the following specific error details
and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'ImageFormat' is not declared.
Source Error:
Line 25:
Line 26:    ' invio in output via Response - formato Gif
Line 27:    BitMap.Save(Response.OutputStream, ImageFormat.Gif)
Line 28:    BitMap.Dispose()
Line 29:
di che si tratta?
ciao
sp-

 di che si tratta?
manca il riferimento al namespace System.Drawing
inserisci in alto nella pagina:
<% @Import NameSpace="System.Drawing" %>


 <% @Import NameSpace="System.Drawing" %>
ah.... veramente c'è già
 :-(
questo il codice completo, come su aspitalia:
<% @Import NameSpace="System.Drawing" %>
<% @Page Language="VB" ContentType="image/gif"%>
<SCRIPT  language="VB" runat="server">
Sub Page_Load(sender As Object, e As EventArgs)
   ' definisco una nuova bitmap con dimensioni
   dim bitmap as new Bitmap(180, 30)
   ' creo un'immagine a partire dalla bitmap
   dim img as Graphics = Graphics.FromImage(bitmap)
   ' definisco il colore
   Dim Rosso As New SolidBrush(Color.Red)
   ' definisco il font e la dimensione
   dim textFont as New Font("Arial", 12)
   ' definisco il testp
   dim testo as String = DateTime.Now.ToLongDateString()
   ' inserisco la stringa - testo, font, color, x, y
   img.DrawString(testo, textFont, rosso, 5, 5)
   ' invio in output via Response - formato Gif
   BitMap.Save(Response.OutputStream, ImageFormat.Gif)
   BitMap.Dispose()
End Sub
</SCRIPT>
l'errore è sempre il solito:
 Description: An error occurred during the compilation of a resource
required to service this request. Please review the following specific error
details and modify your source code appropriately.
Compiler Error Message: BC30451: Name 'ImageFormat' is not declared.
sulla riga  "BitMap.Save(Response.OutputStream, ImageFormat.Gif)"
:-(
ciao sp-