צפיות
תשובות
runtime error
שלום
קבלתי עבודה ראשונה.
העלתי קובץ aspx ,שמעדכן database באתר עסקי, לשרת עסקי.
במחשב שלי הכול הלך כשורה.
באתר קבלתי שגיאה שבשביל להתחיל לראות אותה עלי לשנות הגדרות ב-
web.configuration
ניסיתי לשנות הגדרות ב-web.con אך ללא הועיל
מישהו מכיר את הנושא?
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>
12 תשובות
תודה
הסתדרתי
oleDbconnection
שלום לכולם
אני מנסה לפתוח חיבור oleDbconnection ל-access בשרת עסקי
ואני לא מצליח אצלי במחשב אני כן מצליח הנה הקוד:
Dim Conn As New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=mail.mdb")
Dim objCmd As New OleDbCommand _
("SELECT * FROM maillist2", Conn)
dim objReader as OleDbDataReader
try
objCmd.Connection.Open()
objReader = objCmd.ExecuteReader()
catch ex as Exception
lblMessage.Text = "Error retrieving from the database. Please" & _
" make sure all values are correctly input"
end try
להבא, תיישר את הקוד לשמאל. יש אייקון של ישור לשמאל בצד השמאלי של שורת האייקונים של תוכן ההודעה, תשתמש בו.
Dim Conn As New OleDbConnection( _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=mail.mdb")
Dim objCmd As New OleDbCommand _
("SELECT * FROM maillist2", Conn)
dim objReader as OleDbDataReader
try
objCmd.Connection.Open()
objReader = objCmd.ExecuteReader()
catch ex as Exception
lblMessage.Text = "Error retrieving from the database. Please" & _
" make sure all values are correctly input"
end try
ודבר שלישי, תעיף את ה try catch, תראה איזה הודעת שגיאה אתה מקבל, ותעתיק אותה לפורום.
עדיין החיבור לא נפתח
הדף עולה אין שגיאה אבל אין השפעה על ה-database
החיבור נפתח
תודה
אני מצליח לראות את הקובץ.
שאלה נוספת:
הקובץ אמור להיות בשרת לפני ה-www
השאלה היא איך ב-(server.mappath("northwind.mdb"))
אני מנתב כמה תיקיות לפני המיקום הנוכחי
עם כתובת מוחלטת
מה הפשט כתובת מוחלטת?
server error
שלום
פתחתי קובץ לקריאה ע"מ לשלוח מייל קבוצתי – באתר עסקי
הכל טוב ויפה,כשאני לוחץ שלח אני מקבל שגיאה
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 26:
Line 27: Dim objEmail As New MailMessage
Line 28: objEmail.To = objReader.GetString(0) שגיאה
Line 29: objEmail.From = From.Value
Line 30: objEmail.Subject = "Test Email"
יש למשהו רעיון
כתובת מוחלטת
c:datafile.mdb
רעיון
הרעיון הראשון הוא לישר את הטקסט לשמאל שיהיה אפשר לקרוא…
objReader.GetString(0)
בטוח שהוא מחזיר משהו?
תודה
איכשהו הסתדרתי
אני לא יכול להצביע על הבעיה
בעל אופן תודה!
איך יורדים שורה ב-vb.net
לדוגמא: |הקוד
objEmail.Body = body.Value & "בלה בלה"
?שה-בודי יופיע לפני המחרוזת ומעליה
.לגבי ההודעה למעלה נפלט לי