Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB 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 October 6th, 2014, 03:19 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Interesting; it could be because of the authentication mechanism where IE authenticates against the WSAT and Chrome does not.

Thanks for posting a follow up!

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 October 3rd, 2015, 06:19 PM
Registered User
 
Join Date: Oct 2015
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default Compilation Error CS0122

I've tried multiple times, and am even now using a different port number and I receive an error message. People online said to comment out line 989 (shown below) and say to replace it with string appId = 1, but that doesn't seem to work either. Any suggestions?


Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0122: 'System.Configuration.StringUtil' is inaccessible due to its protection level

Source Error:




Line 987:
Line 988: // Put together some unique app id
Line 989: string appId = StringUtil.GetNonRandomizedHashCode(String.Concat( appPath, appPhysPath)).ToString("x", CultureInfo.InvariantCulture);
Line 990:
Line 991:


Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP. NETWebAdminFiles\App_Code\WebAdminPage.cs Line: 989
 
Old October 4th, 2015, 07:38 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

I never had to change this to get it to wok, so it may be something on your system. Did you see these posts:

http://forums.asp.net/t/2048682.aspx...s+Application+
http://stackoverflow.com/questions/2...iguration-tool

Someone suggests that Visual Studio (RCs) on the same machine caused the issue.

Also, did you try string appId = "1" instead of string appId = 1?

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 October 8th, 2015, 08:47 PM
Registered User
 
Join Date: Oct 2015
Posts: 8
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Imar, thank you for the quick reply! I have just gotten back to this now.

I went back and changed line 989 to string appId = "1", and then followed the steps from the stackedoverflow link you posted and it worked!

For anyone else running into this issue, comment out line 989 using the directions with this link: http://stackoverflow.com/questions/3...its-protection

Then start command promt and follow these directions: http://stackoverflow.com/questions/2...iguration-tool

For reference I am using Visual Studio 2015 Community Edition, Windows 10, and I used the Microsoft Edge browser. I was asked to login credentials, which are identical to those used to log on to your computer.
The Following User Says Thank You to FittyFrank For This Useful Post:
Imar (October 10th, 2015)
 
Old October 10th, 2015, 04:03 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great, thanks for posting this follow up.

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 October 18th, 2015, 05:08 AM
Registered User
 
Join Date: Oct 2015
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi there,

I am also stuck on Chapter 16, Page 614..

I have followed and implemented all of the solutions above but I am faced with this compiler error:

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0101: The namespace 'System.Web.Administration' already contains a definition for 'WebAdminPage'

Source Error:

Line 25: using System.Security.Permissions;
Line 26:
Line 27: public class WebAdminPage : Page {
Line 28: private const string APP_PATH = "WebAdminApplicationPath";
Line 29: private const string APP_PHYSICAL_PATH = "WebAdminPhysicalPath";


Source File: c:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP. NETWebAdminFiles\App_Code\WebAdminPage.cs Line: 27

I can start IIS from the command prompt and the prompt displays exactly as figure 16-16.

When I type in the URL into the browser I am faced with the compiler error. When I check the command prompt IIS is displaying:
Request Started: Get (then the URL) then
Request Ended: (then the URL) and with HTTP Status 500.0

I have tried this in IE and firefox.
I have tried it with an administrator account and with a standard windows account.

I would be very grateful if you could help, I have spent a good few hours tinkering now!

I am on Windows 10, with VS 2013 for Web.

Cheers,

Dave
 
Old October 22nd, 2015, 05:25 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Dave,

I've never seen this error. Besides your post, Google has one other result:http://forums.asp.net/t/974355.aspx?...stration+Tool+ where mahesh.shind suggests to remove / rename WebAdminPage.cs from that folder. Does that solve the issue?

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:
Dave_TTC (October 28th, 2015)
 
Old October 26th, 2015, 02:36 PM
Authorized User
 
Join Date: Feb 2012
Posts: 22
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Problem with step 3

I have type in to the cmd line

iisexpress.exe /path:"C:\Windows\Microsoft.NET\Framework\v4.0.3031 9\ASP.NETWebAdminFiles"/vpath:"/ASP.NETWebAdminFiles" /port:8082 /clr:4.0 /ntlm

I get "Invalid physical path."

I typed in cd C:\Windows\Microsoft.NET\Framework\v4.0.30319\ASP. NETWebAdminFiles

no problem finds path
what am I missing here?
my website is at E:\Websites\PlanetWroxII

Last edited by happyandstable; October 26th, 2015 at 02:38 PM..
 
Old October 26th, 2015, 05:28 PM
Authorized User
 
Join Date: Feb 2012
Posts: 22
Thanks: 0
Thanked 4 Times in 4 Posts
Default No 4

Ok I got it to work and iisexpress is running.

it was the quotation marks that threw it for me.
 
Old October 27th, 2015, 11:07 AM
Authorized User
 
Join Date: Feb 2012
Posts: 22
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Help with accessing database in ASP.NET Website Administration tool.
I got the website administration tool working. When I go to the security tab I get this message.
There is a problem with your selected data store. This can be caused by an invalid server name or credentials, or by insufficient permission. It can also be caused by the role manager feature not being enabled. Click the button below to be redirected to a page where you can choose a new data store.

The following message may help in diagnosing the problem: Access to the path 'C:\Users\PCAudioLabs User\AppData\Local\Temp\Temporary ASP.NET Files\�\4bd57d2d\9bf45fc8\hash' is denied.
Now my database does not sit in the App_Data folder.
It sits in F:\SQLDataBaseFiles\Microsoft SQL Server\MSSQL12.\MSSSQLSSERVER\MSSQL\Data
I am using SQLExpress 2014
When I tried to created the database in the App_Code folder but I had connections problems so I just created a sqlconnection in serverexplorer. Everything has worked fine to this point. Seems like I am missing a setting somewhere telling VS2013 Pro to look in the right place for the database when I try to use Web admin tool. I have been searching the web can not find a fix any thoughts would be appreciated.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 16, Page 584 JHubschman BOOK: Beginning ASP.NET 4 : in C# and VB 5 August 26th, 2011 05:56 PM
Chapter 16 Page 558 runner1181 BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 February 9th, 2010 03:18 AM
Chapter 1 Page 16 - Try It Out bradnerdhss BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 January 31st, 2006 02:11 PM





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