Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET Web Pages with WebMatrix
This is the forum to discuss the Wrox book Beginning ASP.NET Web Pages with WebMatrix by Mike Brind, Imar Spaanjaars ; ISBN: 978-1-1180-5048-4
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET Web Pages with WebMatrix 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 Display Modes
  #1 (permalink)  
Old April 6th, 2014, 03:19 PM
Authorized User
Points: 313, Level: 6
Points: 313, Level: 6 Points: 313, Level: 6 Points: 313, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 74
Thanks: 21
Thanked 2 Times in 2 Posts
Default Web Hosting Issue

Been two years since I've been on here asking Imar and Mike about the book.
I'm working on a large project at work using WebMatrix (behind the firewall: Intranet) but lately I'm getting a bad feeling about web hosting of WebMatrix, which unfortunately may be relevant to my larger work project.

I get feeling while WebMatrix runs perfectly and shines at the client end, doing the same with a hosting service is rather complex.

After completing a very small four file WebMatrix site locally, hosting my site on the web has been a total failure as of this writing. I suspected there would be issues, so kept things very simple with only four *.cshtml pages. The entire site, with exactly the same directory tree structure was FTP'd to GoDaddy. For some reason, only Default.cshtml was up on the browser, but would not link to my other three *.cshtml pages. Also, none of the *.cshtml pages would run when the path was entered on the browser address bar. Presently I just have one file Test.cshtml on the site and it fails to open.

Initially I thought it might be a directory structure issue, then realized the hosting server was not recognizing my *.cshtml pages since my images were loading!

So renamed all the *.cshtml pages to *.html and they all ran and after the links were changed they all worked. So now, I have a static site with no database interactivity, which makes it useless.

I am presently using GoDaddy and so far they say they are running version 4.0 of the .NET framework. Tech support puts the error on my side, but something tells me they're not fully supporting WebMatrix or ASP.Net.

There's something about needing a WebMatrix publish profile, but GoDaddy's directions point to a dead end. I suspect my web.config file may have the answer, but I've also attempted to tweak it without success. I even used the AppData/Packages*.* (all the Microsoft sub folders in there) files from the Bakery sample site to no avail, thinking I had the wrong Package files.

The simplest thing to do would be to drop GoDaddy for another hosting service, but I'd like to keep hacking here because I learn from failure (it sinks in far better when you succeed from it)

Any help here would be great!

JJ

Last edited by jpjamie; April 6th, 2014 at 03:37 PM.
Reply With Quote
  #2 (permalink)  
Old April 11th, 2014, 03:43 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Hi there,

You may find the following useful:

http://www.microsoft.com/web/post/ho...sing-webmatrix

http://forums.asp.net/t/1584592.aspx...C+site+to+IIS7

Also, make sure the remote site's Bin folder contains the necessary assemblies (.dll files). If they are not copied automatically, copy them manually using FTP.

Did you also upload your local web.config to the root of the website?

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
The Following User Says Thank You to Imar For This Useful Post:
jpjamie (June 28th, 2014)
  #3 (permalink)  
Old June 28th, 2014, 12:26 PM
Authorized User
Points: 313, Level: 6
Points: 313, Level: 6 Points: 313, Level: 6 Points: 313, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 74
Thanks: 21
Thanked 2 Times in 2 Posts
Default Thanks and Everything Worked!

Thanks Imar!

After getting all the code to GoDaddy, my client sold his taxi company to a competitor. I got paid, it was a fun job and best of all I learned a lot from the experience, which is the BEST of all! Initially, none of the *.cshtml files would display (only *.html), however I eventually got to GoDaddy's tech support "guru" who helped me get it all working.


+++++++++++++++++++++++++++

Now have a question I hope others, especially ColdFusion developers transitioning to ASP.Net will benefit from.

I'm converting a "simple" ColdFusion online quiz to WebMatrix (with some JQuery accordion magic), because my company is dropping Adobe ColdFusion in favour of Microsoft. I'm fine with all that, but the skin shedding metamorphosis is painful!

Everything is going well so far, but I'm stumped on how to create a URL that (links to) opens another page displaying a specific database table row.

Here is the CF link code...
Code:
<a href="results32006.cfm?ResExamID=#URLEncodedFormat(ResExamID)#">#Name#</a> 
Below is the CF code to the page (results32007.cfm) with the SQL query that displays the database row on the page.

As you can see the URLEncodedFormat passes ResExamID to the query...
Code:
<cfquery datasource="#DS#" Name="Details" 
	dbtype="ODBC" 
	debug 
	username="#client.sqlrole#" 
	password="#client.sqlupass#">
SELECT  *
FROM		ResidentExam
WHERE	  ResExamID='#url.ResExamID#'
AND WeekNumber = ' 3 '
</cfquery>
While the above code does the job for me in the ColdFusion application, how do I do this in WebMatrix?

UPDATE: I am almost sure I found the answer on page 349 in the book...DUH! Any corroborative help on this is still much appreciated! Thanks!


Cheers!
James

Last edited by jpjamie; June 29th, 2014 at 03:10 PM.
Reply With Quote
  #4 (permalink)  
Old June 29th, 2014, 07:18 AM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

>> DUH! Any corroborative help on this is still much appreciated! Thanks!

What is it that you still need help with? Can you post the code you have so far?

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
The Following User Says Thank You to Imar For This Useful Post:
jpjamie (June 29th, 2014)
  #5 (permalink)  
Old June 29th, 2014, 03:08 PM
Authorized User
Points: 313, Level: 6
Points: 313, Level: 6 Points: 313, Level: 6 Points: 313, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 74
Thanks: 21
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by Imar View Post
>> DUH! Any corroborative help on this is still much appreciated! Thanks!

What is it that you still need help with? Can you post the code you have so far?

Imar
Need to be at work to write the code and will take the book into work.

It's basically web page routing, but needs a SQL query (which I've done before) for database row Id's.

I need to write the WebMatrix (Razor) code for a URL link, that passes the database row Id, so the new page displays that specific row. I know I need a SQL query on the page with the link to get the row Id and I need another on the new page. So I will hack away at it this next week and see what I can come up with.

I like a challenge.

So will repost my attempts this next week.

Thanks!

Last edited by jpjamie; June 29th, 2014 at 03:24 PM.
Reply With Quote
  #6 (permalink)  
Old July 1st, 2014, 08:23 AM
Authorized User
Points: 313, Level: 6
Points: 313, Level: 6 Points: 313, Level: 6 Points: 313, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2011
Posts: 74
Thanks: 21
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by jpjamie View Post
Need to be at work to write the code and will take the book into work.

It's basically web page routing, but needs a SQL query (which I've done before) for database row Id's.

I need to write the WebMatrix (Razor) code for a URL link, that passes the database row Id, so the new page displays that specific row. I know I need a SQL query on the page with the link to get the row Id and I need another on the new page. So I will hack away at it this next week and see what I can come up with.

I like a challenge.

So will repost my attempts this next week.

Thanks!
I found the answer here:
http://www.asp.net/web-pages/tutoria...king-with-data
Reply With Quote
The Following User Says Thank You to jpjamie For This Useful Post:
Imar (July 1st, 2014)
Reply


Thread Tools
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
hosting issue mark_gilb BOOK: Beginning ASP.NET 4.5 : in C# and VB 1 September 2nd, 2013 04:11 PM
Web Service and web hosting jrobb .NET Web Services 1 May 22nd, 2013 05:01 AM
Web Hosting Issue shariful ASP.NET 3.5 Basics 9 December 16th, 2011 06:57 AM
Web Hosting gokul_blr Classic ASP Databases 2 January 23rd, 2006 02:59 PM
Web Hosting dipesh .NET Web Services 0 September 8th, 2003 03:22 AM



All times are GMT -4. The time now is 01:16 PM.


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