Reply
ASP.NET - URI Formats Not Supported?
Old 03-17-2009, 12:40 PM ASP.NET - URI Formats Not Supported?
mb2000inc's Avatar
Super Talker

Posts: 118
Name: Mark
Location: Ohio
Trades: 0
I'm going to get into trouble with this for putting it out there before going live with it, but I'm in a bind, now.

I thought I had emails figured out with my previous post (request.querystring) But apparently, I don't.

So, here's the situation: I have a form, that's passing variables between pages and sending an email at the end (with a predifinded attachment in the code). A user fills out the form and BAM! they get an email... and a confirmation is sent to me stating that the form was filled out.

I've worked out most of the kinks.... i get the confirmation that someone has filled it out, but the person doing the filling doesn't get their email.

Here's the link (<-click it).... keep in mind that it's still being tested. I have some textboxes at the top of each page so I can track if the variables are being passed (they will be invisible when I'm finished)

Note, I've commented a lot of crap while working on this (Because I always do... in case, I'm not the next person to read it... and it's still in development... so some of the commented out code is still present.)

I'll post the code in the next comment...

Also, please keep in mind that I'm going to get in trouble for posting it here, so I hope that you will understand that I need complete confidentiality.

Thanks.
__________________
Need a vacation.
mb2000inc is offline
Reply With Quote
View Public Profile Visit mb2000inc's homepage!
 
 
When You Register, These Ads Go Away!
Old 03-17-2009, 12:44 PM Re: ASP.NET - URI Formats Not Supported?
mb2000inc's Avatar
Super Talker

Posts: 118
Name: Mark
Location: Ohio
Trades: 0
Here's the code... please see attached

PS:
I forgot to mention that I'm getting that error when the mail tries to send. "URI Formats Not Supported"...

Sorry....I'm a dork.
Attached Files
File Type: txt Code.txt (16.5 KB, 0 views)
__________________
Need a vacation.

Last edited by mb2000inc; 03-17-2009 at 02:33 PM..
mb2000inc is offline
Reply With Quote
View Public Profile Visit mb2000inc's homepage!
 
Old 03-18-2009, 09:49 AM Re: ASP.NET - URI Formats Not Supported?
mb2000inc's Avatar
Super Talker

Posts: 118
Name: Mark
Location: Ohio
Trades: 0
Ok, I figured it out. In my code, I was trying to attach a file using an absolute path.

In doing so, the errors came out of the woodwork.

In using a relative path, it was trying to pull from my C:\ drive and the errors still came... so I found some information on something called "Server.MapPath"

If you looked at my code it was an IF statement.

So, my path was defined in that statement.
Code:
Dim Path, othervariable as String
othervariable = somelabel.Text
 
If somelabel.Text = "This" then
 Path = "~/folder/folder/document1"
ElseIf somelabel.Text = "That" then
 Path = "~/folder/folder/document2"
End If
Dim Attach As New System.Net.Mail.Attachment(Server.MapPath(path))
That's it... that's all it took was a relative path and that little snippet "Server.MapPath".

Sometimes, it's the simpler things that get me.

Thanks anyway.

-mb
__________________
Need a vacation.
mb2000inc is offline
Reply With Quote
View Public Profile Visit mb2000inc's homepage!
 
Reply     « Reply to ASP.NET - URI Formats Not Supported?
 

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.18242 seconds with 14 queries