Click here to Skip to main content
15,895,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
Question[help]ListView Layout Problem [modified] Pin
calvenyow31-Mar-10 21:30
calvenyow31-Mar-10 21:30 
QuestionThe Client does not Download the Lastest Upload File Pin
Xiaoming Qian31-Mar-10 20:33
Xiaoming Qian31-Mar-10 20:33 
AnswerRe: The Client does not Download the Lastest Upload File Pin
Venkatesh Mookkan31-Mar-10 20:42
Venkatesh Mookkan31-Mar-10 20:42 
AnswerRe: The Client does not Download the Lastest Upload File [modified] Pin
Arindam Tewary31-Mar-10 20:44
professionalArindam Tewary31-Mar-10 20:44 
AnswerRe: The Client does not Download the Lastest Upload File Pin
PSK_31-Mar-10 22:11
PSK_31-Mar-10 22:11 
QuestionASP.NET Control in MVC Pin
M. K. BASHER31-Mar-10 19:30
M. K. BASHER31-Mar-10 19:30 
AnswerRe: ASP.NET Control in MVC Pin
Sandeep Mewara31-Mar-10 19:40
mveSandeep Mewara31-Mar-10 19:40 
QuestionWeb Service Not Working [modified] Pin
BlitzPackage31-Mar-10 16:42
BlitzPackage31-Mar-10 16:42 
Good people,

Hello. Our webservice is not working. We should be receiving information via an HTTP POST. However, nothing is working. Below are the code files. Let me know what you think. Thanks in advance for any help or information you can provide. (By the way, some information (e.g. class names, connection strings, etc...) has been removed or changed in order to hide any sensitive information.

<pre>
Imports System.Web.Mail
Imports System.Data
Imports System.Data.SqlClient
Imports System.IO

Partial Class hbcertification
Inherits System.Web.UI.Page
Public strBody As String = ""
Public sqlInsertStr As String = ""
Public errStr As String = ""
Public txn_id, first_name, last_name, address_street, address_city, address_state, address_zip, address_country, address_phone, payer_email, Price, key, invoice, payment_date, mc_fee, buyer_ip As String
Dim myConn As New SqlConnection(ConfigurationSettings.AppSettings("ConnectionInfo"))
'*******************************************************************************************
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
strBody += "Test email sent.<br><br>Customer name: " & Request("first_name") & " " & Request("last_name")
strBody += "<br>Reg Key: " & Request("key") & "<br><br>Transaction ID: " & Request("txn_id") & "<br>Tran Type: " & Request("txn_type")

updateFile(Server.MapPath("log.txt"), strBody)

txn_id = Request("txn_id")
first_name = Request("first_name")
last_name = Request("last_name")
address_street = Request("address_street")
address_city = Request("address_city")
address_state = Request("address_state")
address_zip = Request("address_zip")
address_country = Request("address_country")
address_phone = Request("address_phone")
payer_email = Request("payer_email")
Price = Request("Price")
key = Request("key")
invoice = Request("invoice")
payment_date = Request("payment_date")
mc_fee = Request("mc_fee")
buyer_ip = Request("buyer_ip")

If Request("first_name") <> "" And Request("last_name") <> "" Then
SendMail("jamesrobertson@hotmail.com", "feedback@morris.com", strBody, "Software Order Notification", "sales@morris.com")
Else
Response.Write("<br>Email not sent. Name missing.")
End If
Dim sItem As String
Response.Write("<br><hr noshade size=""1"" />")
If Request.Form("dosubmit") = "1" Then
Response.Write("FORM VALS:")
For Each sItem In Request.Form
Response.Write("<br>" & sItem & " - [" & Request.Form(sItem) & "]")
Next
sqlInsertStr += "insert into aspnet_MorrisCustomerInfo (TransactionID,FirstName,LastName,AddressStreet,AddressCity,AddressState,AddressZip,AddressCountry,AddressPhone,PayerEmail,Price,AuthenticationCode,InvoiceID,PurchaseDate,PaypalFee,PurchaseIPAddress) values ('" & SQLSafe(txn_id) & "','" & SQLSafe(first_name) & "','" & SQLSafe(last_name) & "','" & SQLSafe(address_street) & "','" & SQLSafe(address_city) & "','" & SQLSafe(address_state) & "','" & SQLSafe(address_zip) & "','" & SQLSafe(address_country) & "','" & SQLSafe(address_phone) & "','" & SQLSafe(payer_email) & "','" & SQLSafe(Price) & "','" & SQLSafe(key) & "','" & SQLSafe(invoice) & "','" & SQLSafe(payment_date) & "','" & SQLSafe(mc_fee) & "','" & SQLSafe(buyer_ip) & "')"
runMyQuery(sqlInsertStr, False)
End If
Response.Write("<br>sqlInsertStr is: " & sqlInsertStr)
Response.Write("<br><hr noshade size=""1"" />")
End Sub
'*******************************************************************************************
Sub SendMail(ByVal strEmailAddress, ByVal strEmailAddress_cc, ByVal Email_Body, ByVal Email_Subject, ByVal Email_From)
If Request.ServerVariables("server_name") <> "localhost" Then
Try
Dim resumeEmail As New MailMessage
resumeEmail.To = strEmailAddress
resumeEmail.Cc = strEmailAddress_cc
resumeEmail.From = Email_From
resumeEmail.Subject = Email_Subject
resumeEmail.Priority = MailPriority.High
'resumeEmail.BodyFormat = MailFormat.Html
resumeEmail.BodyFormat = MailFormat.Html
resumeEmail.Body = Email_Body
'System.Web.Mail.SmtpMail.SmtpServer = "morris.com"
System.Web.Mail.SmtpMail.SmtpServer = "relay-hosting.secureserver.net"
System.Web.Mail.SmtpMail.Send(resumeEmail)

Response.Write("<br>Email sent.")
Catch exc As Exception
Response.Write("<br><b>MAIL ERROR OCCURRED</b><br><br>" & exc.ToString() & "<br>From: " & Email_From)
End Try
Else
Response.Write("<br><br><b>TEST RESPONSE</b><br><br>" & strBody & "")
End If
End Sub
End Function
End Class

<%@ Page Language="VB" Debug="true" AutoEventWireup="false" CodeFile="hbcertification.aspx.vb" Inherits="hbcertification" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Process Data</title>
</head>
<body>

<form id="form1" runat="server">
<br /><br />
</form>

</body>
</html>

<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the
web admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>

<appSettings>
<add key="ConnectionInfo" value="********************************************************" />
<add key="maintable" value="test123" />
<add key="sitename" value="Hyper - Another Dimension" />
</appSettings>

<connectionStrings/>
<system.web>
<!--
Set compilation debug="true" to insert debugging
symbols into the compiled page. Because this
affects performance, set this value to true only
during development.
-->
<compilation debug="true" />
<!--
The <authentication> section enables configuration
of the security authentication mode used by
ASP.NET to identify an incoming user.
-->
<authentication mode="Windows" />
<!--
The <customErrors> section enables configuration
of what to do if/when an unhandled error occurs
during the execution of a request. Specifically,
it enables developers to configure html error pages
to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="NoAccess.htm" />
<error statusCode="404" redirect="FileNotFound.htm" />
</customErrors>
-->
</system.web>

</configuration>
</pre>


-- Modified Thursday, April 1, 2010 7:54 AM
AnswerRe: Web Service Not Working Pin
Sandeep Mewara31-Mar-10 19:43
mveSandeep Mewara31-Mar-10 19:43 
GeneralRe: Web Service Not Working Pin
BlitzPackage1-Apr-10 2:00
BlitzPackage1-Apr-10 2:00 
Questioncreating csv file in web serivce Pin
scorpio2231-Mar-10 10:15
scorpio2231-Mar-10 10:15 
AnswerRe: creating csv file in web serivce Pin
Not Active31-Mar-10 11:14
mentorNot Active31-Mar-10 11:14 
GeneralRe: creating csv file in web serivce Pin
scorpio2231-Mar-10 16:13
scorpio2231-Mar-10 16:13 
AnswerRe: creating csv file in web serivce Pin
Venkatesh Mookkan31-Mar-10 16:25
Venkatesh Mookkan31-Mar-10 16:25 
GeneralRe: creating csv file in web serivce Pin
scorpio2231-Mar-10 16:27
scorpio2231-Mar-10 16:27 
GeneralRe: creating csv file in web serivce Pin
scorpio2231-Mar-10 16:35
scorpio2231-Mar-10 16:35 
GeneralRe: creating csv file in web serivce Pin
Not Active31-Mar-10 16:31
mentorNot Active31-Mar-10 16:31 
Questionbutton field in gridview Pin
sunnu 231-Mar-10 7:13
sunnu 231-Mar-10 7:13 
AnswerRe: button field in gridview Pin
Not Active31-Mar-10 7:22
mentorNot Active31-Mar-10 7:22 
AnswerRe: button field in gridview Pin
MyDevBank31-Mar-10 21:59
MyDevBank31-Mar-10 21:59 
QuestionIHttpModule Custom Authentication Pin
Fayu31-Mar-10 7:01
Fayu31-Mar-10 7:01 
AnswerRe: IHttpModule Custom Authentication Pin
Fayu31-Mar-10 8:03
Fayu31-Mar-10 8:03 
Questionhow to refresh data source controls Pin
ships_agr31-Mar-10 6:53
ships_agr31-Mar-10 6:53 
AnswerRe: how to refresh data source controls Pin
Venkatesh Mookkan31-Mar-10 17:52
Venkatesh Mookkan31-Mar-10 17:52 
GeneralRe: how to refresh data source controls Pin
ships_agr1-Apr-10 3:17
ships_agr1-Apr-10 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.