imho.ws
IMHO.WS  

Вернуться   IMHO.WS > Веб-мастеру > Веб-программирование
Опции темы
Старый 01.10.2005, 13:22     # 1
siambestexport
Guest
 
Сообщения: n/a

Question Проблема с веб-формой

Есть проблема с формой отправки сообщений (написана на VB.NET) Их несколько:
1. Visual Web Developer просит использовать System.Net.Mail вместо System.Web.Mail для скрипта отправки сообщений через интернет. Хотя класс System.Web.Mail насколько я знаю именно для этого и предназначен.
<%@ Page Language="VB" Debug = "True" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<script runat="server">

Private Sub butSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butSend.Click
Dim msgMail As New System.Web.Mail.MailMessage
msgMail.From = txtFrom.Text
msgMail.To = DropDownList1.SelectedValue.ToString
msgMail.Subject = txtSubject.Text
msgMail.Body = txtMessage.Text
System.Web.Mail.SmtpMail.Send(msgMail)
txtSubject.Text = ""
txtMessage.Text = ""
End Sub
</script>
2. На локальном комптьютере скрипт работает нормально (ASP.NET Development Server) но на удаленном компьютере выдается сообщение об ошибке tion: 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>

Мой web.config:
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
<system.web>
<customErrors mode="Off"/>
<compilation debug="true"/>
<authentication mode="Windows"/>
</system.web>
</configuration>
В чем проблема? Конфигурационный файл, настройки сервера, что-то еще?

Последний раз редактировалось siambestexport; 01.10.2005 в 13:26.
 

Опции темы

Ваши права в разделе
Вы НЕ можете создавать новые темы
Вы не можете отвечать в темах.
Вы НЕ можете прикреплять вложения
Вы НЕ можете редактировать свои сообщения

BB код Вкл.
Смайлы Вкл.
[IMG] код Выкл.
HTML код Выкл.

Быстрый переход


Часовой пояс GMT +4, время: 03:28.




Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.