You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
Hey imar offcourse i will post my codes wich ones do you want here?
Everything now works the only thing is when i publish it through visual studio i get these errors :S (really weard becouse it works in local mode)
Error 1 C:\Documents and Settings\Christian\Mijn documenten\Visual Studio 2005\WebSites\Nieuwe map\WebShop\Betaal.aspx(57): error BC30554: 'ShoppingCartView' is ambiguous. C:\Documents and Settings\Christian\Mijn documenten\Visual Studio 2005\WebSites\Nieuwe map\WebShop\Shop\Default.aspx 1
Error 2 'ShoppingCartView' is ambiguous. C:\Documents and Settings\Christian\Mijn documenten\Visual Studio 2005\WebSites\Nieuwe map\WebShop\Betaal.aspx 57
Error 3 'ShoppingCartView' is ambiguous. C:\Documents and Settings\Christian\Mijn documenten\Visual Studio 2005\WebSites\Nieuwe map\WebShop\shopc.aspx 10
And when i give them all diffrent names he still sas that from other pages really weard :S
No i don;t have multiple Default classes or other classes
But when i change for example Wrox:ShoppingCartView to My:ShopView It works doesn;t give an error on that page but on the page wich links from it does give an error :S
But aint it strange that it works on local and not on a publisher
Oke i just uploaded it using filezilla that atleast justs uploads it.
But i get a Configuration Error:
Server Error in '/' Application.
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.
Source Error:
Line 20: </connectionStrings>
Line 21: <system.web>
Line 22: <authentication mode="Forms">
Line 23: <forms loginUrl="~/Registreer.aspx"/>
Line 24: </authentication>
Yeah, very strange indeed. Sounds like a configuration problem, or maybe there are files missing, or extra files with a different name? Try clearing the remote folder first and then do a clean upload.
A quick Google search should give you plenty of results on this error. Basically, the folder this application resides in must be marked as a virtual directory (under IIS) or you should move it to the root of the site.
Can you please start new threads for new topics? This is in no way related to "Mail function" anymore, making things a bit more difficult and confusing.
The statictext is cleared dind't changed much just deleted the html and body tags.
Helpers class:
Quote:
quote: Public Shared Sub SendConfirmationMessage( _
Quote:
ByVal theShoppingCart As ShoppingCart, ByVal orderId As Integer, _
ByVal emailAddress As String)
Try
Dim myGridView As GridView = CreateGridView()
myGridView.DataSource = theShoppingCart.Items
myGridView.DataBind()
If myGridView.Rows.Count > 0 Then
myGridView.FooterRow.Cells(0).Text = "Totaal:"
myGridView.FooterRow.Cells(3).Text = _
String.Format("{0:c}", theShoppingCart.Total)
Dim theSubject As String = "Je bestelling bij Itasc"
Dim theMessage As String = My.Computer.FileSystem.ReadAllText _
(AppConfiguration.ConfirmationMessageLocation)
Dim mySmtpClient As New System.Net.Mail.SmtpClient
theMessage = theMessage.Replace("##ShoppingCart##", _
GetHtmlFromControl(myGridView))
theMessage = theMessage.Replace("##OrderNumber##", orderId.ToString())
Dim myMessage As MailMessage = New MailMessage("stage1@itasc.nl", emailAddress, theSubject, theMessage)
myMessage.IsBodyHtml = True
myMessage.Bcc.Add("stage1@itasc.nl")
'myMessage.Bcc.Add("dennis@itasc.nl")
'myMessage.Bcc.Add("inge@itasc.nl")
mySmtpClient.Send(myMessage)
End If
'Public Shared Sub SendConfirmationMessage( _
' ByVal theShoppingCart As ShoppingCart, ByVal orderId As Integer, _
' ByVal emailAddress As String)
' Try
' Dim myGridView As GridView = CreateGridView()
' myGridView.DataSource = theShoppingCart.Items
' myGridView.DataBind()
' If myGridView.Rows.Count > 0 Then
' myGridView.FooterRow.Cells(0).Text = "Totals:"
' myGridView.FooterRow.Cells(3).Text = _
' String.Format("{0:c}", theShoppingCart.Total)
' Dim theSubject As String = "Your order at Wrox WebShop"
' Dim theMessage As String = My.Computer.FileSystem.ReadAllText _
' (AppConfiguration.ConfirmationMessageLocation)
' 'Dim myMailMessage As New System.Net.Mail.MailMessage
' 'myMailMessage.IsBodyHtml = True
' 'theMessage = theMessage.Replace("##ShoppingCart##", _
' ' GetHtmlFromControl(myGridView))
' 'theMessage = theMessage.Replace("##OrderNumber##", orderId.ToString())
' 'Dim myClient As New System.Net.Mail.SmtpClient
' 'myClient.Host = "itascsrv01"
' 'myClient.Send(myMailMessage)
' Dim mySmtpClient As New System.Net.Mail.MailMessage
' mySmtpClient.IsBodyHtml = True
' theMessage = theMessage.Replace("##ShoppingCart##", _
' GetHtmlFromControl(myGridView))
' theMessage = theMessage.Replace("##OrderNumber##", orderId.ToString())
' Dim mClient As New System.Net.Mail.SmtpClient
' mClient.Host = "itascsrv01"
' mClient.Send("stage1@itasc.nl", emailAddress, theSubject, theMessage)
' End If
Catch ex As Exception
End Try
End Sub
End Class
And all the other files i dind't change anything that made it working or not ;)
BTW: did you know that [quote] is to quote someone, while [code] is to represent code in these messages? Using [code] you get a fixed width font which makes things easier to read.