Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 24th, 2015, 01:02 PM
Authorized User
Points: 203, Level: 4
Points: 203, Level: 4 Points: 203, Level: 4 Points: 203, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Mesquite Texas
Posts: 45
Thanks: 11
Thanked 0 Times in 0 Posts
Default Webmatrix: 404 error; Register.cshtml

Hey Imar (Gentlemen),

Webmatrix/Razor/C#/WebPages:
When I deployed my application, I got a 404 error on the REGISTER.cshtml, ONLY, I hope i'm
just missing a DLL. All the other Security features work: Logon, Logoff, Profile, Password...

I don't think I've modified the register file... Everything else works great.

I do have Webmatrx.data.dll & Webmatrix.Webdata.dll installed..but I don't have ALL the other
DLLs that were in the Classifieds example, which was succesfully deployed; no error; Register works there...


Also, I DO have this statement in my _AppStart file :
WebSecurity.InitializeDatabaseConnection("ballet", "Users","UserId","UserName",true);


I was suspecting the AreaRegistration.RegisterAllAreas(); but I had no such problems in the
Classifieds deployment...(which is actually a MVC ? feature ?)

Thanks,
Edward Solon
 
Old September 24th, 2015, 03:18 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Sounds like you're missing the security related assemblies? Try uploading the ones from the example that works.

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!
 
Old September 24th, 2015, 05:24 PM
Authorized User
Points: 203, Level: 4
Points: 203, Level: 4 Points: 203, Level: 4 Points: 203, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Mesquite Texas
Posts: 45
Thanks: 11
Thanked 0 Times in 0 Posts
Default ? which Security Related Assembly

Imar,
Thanks,
Would you be able to make an educated guess as to which One ?

This listing is the bin directory of my Classifieds application. Would I need to just copy the correct DLL file into my new application Or do I need to recompile it ? Your books are GREAT and so is your assistance on these sites.

I listed Both of the bin dirs; Hopefully you can spot something missing; I'd RATHER not test each one individually...ya know..

Thanks Again Imar...

******* Good / Classifieds bin Directory *************
AjaxControlToolkit.dll
AjaxMin.dll
AMD64
EN
HtmlAgilityPack.dll
Microsoft.Data.Edm.dll
Microsoft.Data.OData.dll
Microsoft.Data.Services.Client.dll
Microsoft.Web.Helpers.dll
Microsoft.Web.Infrastructure.dll
Microsoft.WindowsAzure.Configuration.dll
Microsoft.WindowsAzure.Storage.dll
Newtonsoft.Json.dll
System.Data.SqlServerCe.dll
System.Data.SqlServerCe.Entity
System.Spatial.dll
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll
WebMatrix.Data.dll
WebMatrix.WebData.dll
X86
*********************************


*********** The bin of the Failing Application ************
**** that needs the security assembly *****************
AMD64
CsvHelper.dll
EN
Microsoft.Web.Helpers.dll
Microsoft.Web.Infrastructure.dll
System.Data.SqlServerCe.dll
System.Data.SqlServerCe.Entity
System.Web.Helpers.dll
System.Web.Razor.dll
System.Web.WebPages.Deployment.dll
System.Web.WebPages.dll
System.Web.WebPages.Razor.dll
WebMatrix.Data.dll
WebMatrix.WebData.dll
X86
******************************
 
Old September 28th, 2015, 11:39 AM
Authorized User
Points: 203, Level: 4
Points: 203, Level: 4 Points: 203, Level: 4 Points: 203, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Mesquite Texas
Posts: 45
Thanks: 11
Thanked 0 Times in 0 Posts
Default Assemblies

Imar,
Otay, leeme ask another Question....or two...

My web.config looks a bit sparse; Does it get built when I WebDeploy; cause I didn't this time; I used FTP... experimenting and testing...

I tried a using statement; no bueno ( but I didn't have the DLL in the bin), Is that one solution ?

Net4 : uses System.Web.ApplicationServices
Net3.5: uses System.Web

<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" />
</dependentAssembly>

Can I manually construct the assembly statement IF I put the DLL in the bin;...I noticed all my publicKeyTokens are the same ?
Got any links simple assemblies for novices...

Thanks Imar...
 
Old September 28th, 2015, 03:13 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You don't need the assembly binding info for most DLLs. It's there for code that requires an old version, while there's also code that requires a new one. Since you can't have them side by side, the binding redirect is there to "forward" usages of an old one to a new one.

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!
The Following User Says Thank You to Imar For This Useful Post:
EDGY (September 29th, 2015)
 
Old September 29th, 2015, 06:26 PM
Authorized User
Points: 203, Level: 4
Points: 203, Level: 4 Points: 203, Level: 4 Points: 203, Level: 4
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2012
Location: Mesquite Texas
Posts: 45
Thanks: 11
Thanked 0 Times in 0 Posts
Default 404 - usually a redirect error

Imar,
Your not gonna believe this. My 404 error was on my Register.cshtml file and due to server Attacks, the provider had restricted that word; "REGISTER."

I renamed it to "SignUp" and it all works like a charm !!! Yipeee..

I had stripped down the orig file, then replaced it with a dummy n still got errors, VERY Strange.. Then I tried RegisterTest and even moving it to my root, any name with REGISTER in it got a 404...

FYI, ...
Thanks Imar
(you still da MAN)




Similar Threads
Thread Thread Starter Forum Replies Last Post
Webserver not opening page from Webmatrix 3 giving connection error rsaraogi1 BOOK: Beginning ASP.NET Web Pages with WebMatrix 4 September 2nd, 2013 04:02 PM
Error 404 SeniorNSU BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 August 30th, 2006 11:09 AM
404 error DARSIN .NET Framework 2.0 1 March 24th, 2005 06:04 AM
404 error scrowler Pro PHP 1 December 19th, 2004 11:36 AM
Error 404 jackps Dreamweaver (all versions) 2 January 15th, 2004 09:29 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.