Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 20th, 2014, 10:43 PM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default uploading site to server

Hello I am having some problems with uploading my website to a server that is being hosted by hostgator.com.
I just built a portfolio type website using visual web developer, and with the skills I learned from reading asp.net 4 in C# and vb book from like chapter 1 through 12.
It works and debugs great in visual studio, but when I put it on the server, it says it cant find specific files that are in subfolders, which is what I did in visual studio to make it more organized. I talked to hostgator.com and they havn't been able to help me with this issue. I can probably put it all on the server where it would work, but I would have to exclude all the sub directories, and put all the files in one folder, and I would also have to change a lot of code in the markup, because in the markup a lot of files are being called from sub directories.
Shouldn't it work the same on the server as it does in visual studio, because it just doesn't seem logical to have to change folders around and your code just to put it on the server
Here is the website that I have on the server, where you can see the error
portfoliobrown.com/My_Portfolio
and again I don't get that in visual studio it works fine
I Appreciate any help
Thanks
Reply With Quote
  #2 (permalink)  
Old January 21st, 2014, 05:22 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Is My_Portfolio the folder where all you stuff lives, like web.config and the MasterPages folder? If so, the error makes sense. You're pointing to the root of the server, so it tries to find the master page at /MasterPages, rather than at /My_Portfolio/MasterPages.

Two solutions:

1. Move everything from the My_Portfolio folder to the root, keeping the structure in place.

2. Mark /My_Portfolio as a virtual directory / application. Maybe your host can do that, or you can do it through a control panel if that's what they offer. That way, something like ~/MasterPages will resolve to /My_Portfolio/MasterPages instead of /MasterPages.

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #3 (permalink)  
Old January 22nd, 2014, 12:37 AM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hey

Hey thanks a lot
its working I can't believe I didn't think of that before, but that was the only issue.
So I have one more issue. My contact form doesn't work on the server receiving the email the form, like it did when I ran it in visual studio. It has the same code in C# from the book that I have for my contact form. My host couldn't help me with it either. Maybe you might have the solution
Thanks
Reply With Quote
  #4 (permalink)  
Old January 22nd, 2014, 03:51 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Most likely this is due to mail server configuration. Try removing the UpdatePanel to see the real error, or try the mail demo page from the Demo folder. This will make it easier to see what the problem is so you can see what you need to fix.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #5 (permalink)  
Old January 22nd, 2014, 06:14 AM
EricCulbertson
Guest
 
Posts: n/a
Default

appreciate the suggestion and i will do it to fix it
Reply With Quote
  #6 (permalink)  
Old January 22nd, 2014, 08:14 PM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default Hi

Okay after removing the update panel from the markup for the contact form, and sending it this is the error that I receive.

An attempt was made to access a socket in a way forbidden by its access permissions 173.194.64.109: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: An attempt was made to access a socket in a way forbidden by its access permissions 173.194.64.109:587

Source Error:


Line 46:
Line 47: SmtpClient mySmtpClient = new SmtpClient();
Line 48: mySmtpClient.Send(myMessage);
Line 49:
Line 50: Message.Visible = true;

It states that line 48 is causing the issue. Its weird because it works fine when I debug it, just the server its on doesn't like it for some reason
Thanks
Reply With Quote
  #7 (permalink)  
Old January 23rd, 2014, 11:33 AM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I think you'll need to talk to your host to figure out how they allow you to send e-mail. It sounds like you're not allowed to send e-mail to the configured server / port from their network.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
  #8 (permalink)  
Old January 26th, 2014, 04:09 PM
Authorized User
Points: 79, Level: 1
Points: 79, Level: 1 Points: 79, Level: 1 Points: 79, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Alright thanks a lot for your help.
Apparently it was the package that I signed up for that doesn't allow email sending.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with uploading final site/database to GoDaddy SamuelMSr BOOK: Beginning ASP.NET 4 : in C# and VB 12 October 12th, 2011 10:59 AM
Uploading video files on to my site palvin Classic ASP Components 1 September 29th, 2011 06:39 AM
Uploading files to hosting site. tankeros BOOK: Beginning ASP.NET 4 : in C# and VB 1 November 10th, 2010 02:51 AM
Uploading video files on to my site palvin Classic ASP Professional 0 March 1st, 2006 11:13 AM
uploading site aspnet79434319 Classic ASP Basics 1 June 25th, 2005 11:22 PM



All times are GMT -4. The time now is 11:44 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.