Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

.NET Forum


You are currently viewing our .NET Forum as a guest. Please register to participate.
Login



Closed Thread
Old 07-20-2010, 01:43 PM Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
Hey everyone I am new to this group.
I have been catching up with everything in this new job i have and i wanted to ask if anyone has ever had an error where all the forms are just down for no reason and errors are generated once users hit the submit button
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
 
Register now for full access!
Old 07-21-2010, 07:06 PM Re: Forms Errors
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
maybe, maybe not. But errors always have a reason.

Do we get more of a clue
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 07-22-2010, 10:10 AM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
I think the error comes from one of the pages that i was trying to get this to send an email code being:


Dim ThisHost As String = "smtp.dsu.nodak.edu"
Dim ThisPort As Integer = 25
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-22-2010, 11:00 AM Re: Forms Errors
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
That is Visual Basic code NOT vBScript code

there is no "As" keyword for vbscript
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 07-22-2010, 11:10 AM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
As in thats the backend code of my aspx page. So would it still be the same?
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-22-2010, 02:38 PM Re: Forms Errors
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
So it's asp.net not asp then, and what language are you using?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 07-22-2010 at 03:07 PM..
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 07-22-2010, 03:04 PM Re: Forms Errors
Extreme Talker

Posts: 246
Trades: 0
Can you give the stack trace for the error that you are getting?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
Old 07-23-2010, 10:20 AM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
oh I am using VB
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-23-2010, 12:55 PM Re: Forms Errors
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Ok, in that case what is the error?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2010, 12:56 PM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
I believe that the server that does the emailing is either down or the port is incorrect
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-23-2010, 01:06 PM Re: Forms Errors
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Server pings ok, port 25 is correct for SMTP.


Next symptom please.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2010, 01:07 PM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
but for some reason i still get errors
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-23-2010, 01:12 PM Re: Forms Errors
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,384
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Well unless we get more information this will have to be the end of the thread


Debugging nothing at all without the actual error message is impossible.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
View Public Profile Visit chrishirst's homepage!
 
Old 07-23-2010, 01:15 PM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
let me send you the error message:

Server Error in '/getinfo' Application.

No connection could be made because the target machine actively refused it 134.129.111.228:587

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.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 134.129.111.228:587

Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

<%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:


[SocketException (0x274d): No connection could be made because the target machine actively refused it 134.129.111.228:587]
System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) +239
System.Net.Sockets.Socket.InternalConnect(EndPoint remoteEP) +35
System.Net.ServicePoint.ConnectSocketInternal(Bool ean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception) +224

[WebException: Unable to connect to the remote server]
System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +5483851
System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +202
System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21
System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +332
System.Net.Mail.SmtpConnection.GetConnection(Strin g host, Int32 port) +160
System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +159
System.Net.Mail.SmtpClient.GetConnection() +35
System.Net.Mail.SmtpClient.Send(MailMessage message) +1213

[SmtpException: Failure sending mail.]
System.Net.Mail.SmtpClient.Send(MailMessage message) +1531
oel.email(String uID) +3058
oel.insertCheck(String uID) +754
oel.sdsInsPersonalInfo_Inserted(Object sender, SqlDataSourceStatusEventArgs e) +62
System.Web.UI.WebControls.SqlDataSourceView.OnInse rted(SqlDataSourceStatusEventArgs e) +95
System.Web.UI.WebControls.SqlDataSourceView.Execut eDbCommand(DbCommand command, DataSourceOperation operation) +426
System.Web.UI.WebControls.SqlDataSourceView.Execut eInsert(IDictionary values) +227
System.Web.UI.WebControls.SqlDataSource.Insert() +16
oel.btnSubmit_Click(Object sender, EventArgs e) +868
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Version Information: Microsoft .NET Framework Version:2.0.50727.4200; ASP.NET Version:2.0.50727.4205
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-23-2010, 01:46 PM Re: Forms Errors
Extreme Talker

Posts: 246
Trades: 0
Ok, are you even sure you are allowed to use that machine as the SMTP server? Figure out what SMTP server your host allows you to use.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
Old 07-23-2010, 01:50 PM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
yeah i called the admin for that server and he even said that it should be working
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-23-2010, 01:56 PM Re: Forms Errors
Extreme Talker

Posts: 246
Trades: 0
Why is it refusing you on port 587? Are you testing this from your local machine or when you have uploaded the pages to the server?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
Old 07-23-2010, 01:57 PM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
yes i am but even other users who try this has the same error
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Old 07-23-2010, 03:18 PM Re: Forms Errors
Extreme Talker

Posts: 246
Trades: 0
What other users? Users from the live site?
Can you show the code you are using?

Also if you read the error it is saying that the connection was refused and the port you were trying to connect to was 587. SMTP uses port 25. Make sure also that there are extra credentials that you need to use.

Are you hosting with a good hosting company or some guy out of his basement?
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
stbuchok is offline
View Public Profile
 
Old 07-23-2010, 03:25 PM Re: Forms Errors
Average Talker

Posts: 23
Name: Robert Morgan
Trades: 0
This is a company


ok ill send u the vb code:

Code:
Imports System.Net.Mail

Partial Class formmail
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim reqPath As String = Request.PhysicalApplicationPath

        If reqPath = "C:\inetpub\wwwroot\PRODdickinsonstate\formmail\" Then

            Dim NetMail As New MailMessage
            Dim MailClient As New SmtpClient

            'email account info
            Dim ThisHost As String = "smtp.dsu.nodak.edu"
            Dim ThisPort As Integer = 587
            Dim TheseCredentials As New net.NetworkCredential("username", "Password")

            'get sender info
            NetMail.From = New MailAddress(Request("1xcSender"))

            'get recipient(s) info

            'recipient number - begins with one, increment by one
            Dim recNo As Integer = 1

            'add recipients if they exist (TO: field)
            While Request("1xcRecipient" & recNo) <> ""

                NetMail.To.Add(New MailAddress(Request("1xcRecipient" & recNo)))
                recNo += 1

            End While

            'get CC(s) info

            'CC number - begins with one, increment by one
            Dim CCNo As Integer = 1

            'add CC's if they exist (CC: field)
            While Request("1xcCC" & CCNo) <> ""

                NetMail.CC.Add(New MailAddress(Request("1xcCC" & CCNo)))
                CCNo += 1

            End While

            'get BCC(s) info

            'BCC number - begins with one, increment by one
            Dim BCCNo As Integer = 1

            'add BCC's if they exist (BCC: field)
            While Request("1xcBCC" & BCCNo) <> ""

                NetMail.Bcc.Add(New MailAddress(Request("1xcBCC" & BCCNo)))
                BCCNo += 1

            End While

            'build email body
            Dim strBody As String = ""

            'form items
            Dim Item As String

            'get field name lengths for padding
            Dim paddingAmt As Integer = 0

            For Each Item In Request.Form
                If Item.Length > paddingAmt Then
                    paddingAmt = Item.Length
                End If
            Next

            'get form items, insert into body
            Dim strField As String
            Dim strData As String

            For Each Item In Request.Form
                If Item.Substring(0, 3) <> "1xc" Then
                    strField = Item & ": "
                    strField = strField.PadRight(paddingAmt + 3, " ")
                    strData = Request.Form(Item) & vbLf
                    strBody = strBody & strField & strData
                End If
            Next

            'Strings for subject
            NetMail.Subject = Request("1xcSubject")
            NetMail.IsBodyHtml = False
            NetMail.Body = strBody

            MailClient.DeliveryMethod = SmtpDeliveryMethod.Network
            MailClient.Host = ThisHost
            MailClient.Port = ThisPort
            MailClient.EnableSsl = True
            MailClient.UseDefaultCredentials = False
            MailClient.Credentials = TheseCredentials
            MailClient.Send(NetMail)

            'redirect user
            If Request("1xcRedirect") <> "" Then
                Response.Redirect(Request("1xcRedirect"))
            Else
                Response.Redirect("http://www.dickinsonstate.edu/thanks.asp")
            End If

        End If
    End Sub

Last edited by chrishirst; 07-23-2010 at 03:36 PM..
robertpurpose is offline
View Public Profile Visit robertpurpose's homepage!
 
Closed Thread     « Reply to Forms Errors

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.65636 seconds with 12 queries