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: ASP.NET Website Programming Problem-Design-Solution
This is the forum to discuss the Wrox book ASP.NET Website Programming: Problem - Design - Solution, Visual Basic .NET Edition by Marco Bellinaso, Kevin Hoffman; ISBN: 9780764543869
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET Website Programming Problem-Design-Solution 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 15th, 2003, 11:41 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default unexpected error has occurred

I had ThePhileVB running on a Windows 2000 machine but on this Windows XP machine I keep getting the following error. Anybody else seen this?


Error Message:
Access to the path "C:\wrox\ThePhileVB\Config\Polls.Config" is denied.

Error Stack:
System.UnauthorizedAccessException: Access to the path "C:\wrox\ThePhileVB\Config\Polls.Config" is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at Wrox.WebModules.Polls.Configuration.ModuleConfig.G etSettings() in C:\wrox\ThePhileVB\WebModules\Polls\Polls.Configur ation\ModuleConfig.vb:line 35
   at Wrox.WebModules.Polls.Business.Question.GetCurrent Id() in C:\wrox\ThePhileVB\WebModules\Polls\Polls.Business \Question.vb:line 224
   at Wrox.WebModules.Polls.Web.Controls.User.Poll.DataB ind() in C:\wrox\ThePhileVB\WebModules\Polls\Poll.ascx.vb:l ine 260
   at Wrox.WebModules.Polls.Web.Controls.User.Poll.Page_ Load(Object sender, EventArgs e) in C:\wrox\ThePhileVB\WebModules\Polls\Poll.ascx.vb:l ine 62
   at System.Web.UI.Control.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain()
  #2 (permalink)  
Old June 16th, 2003, 09:58 AM
Authorized User
 
Join Date: Jun 2003
Location: Bolingbrook, IL, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi tworkman - It's possible it could be something as simple as directory and/or file permissions? For example, if you were tweaking something and accidentally made either the directory containing Polls.Config or the file itself readable only by Administrator...

Allen
  #3 (permalink)  
Old June 18th, 2003, 10:45 AM
Registered User
 
Join Date: Jun 2003
Location: Toronto, , Canada.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I get the exact same problem too
It wasn't something I tweaked as I got this error the very first time I tried to run (after installation).

I'm also on an XP Pro machine,
any help would be much appreciated.
Thanks

John
  #4 (permalink)  
Old June 18th, 2003, 08:20 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

We are in the same boat John. I have tried all combinations of web sharing and permissions and even removed the Polls module altogether. The error then became a Newsmanager error. I'm sure the fix is something simple but I haven't found it. If anybody has any suggestions, let John and I know.

Thanks
  #5 (permalink)  
Old June 18th, 2003, 10:51 PM
Authorized User
 
Join Date: Jun 2003
Location: Bolingbrook, IL, USA.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi tworkman - I was just about to suggest what you did, removing a module at a time and seeing if the error "propagates," exposing some commonality. If you haven't already, you could try to raise the privilege level at which ASP.NET operates on your machine. This actually solved my initial problems, which were similar to yours (something about application error, security violations and somesuch), but not the exact same "access denied" error.

I don't want to bore you with details if you've tried this already; if you haven't, just give a shout back to this board, and I'll reply. Hang on... there might even be another post here already addressing this.

Allen

mencher cat, mencher cat. boo. cattydear. what a lovely!
  #6 (permalink)  
Old June 19th, 2003, 06:29 PM
Registered User
 
Join Date: Jun 2003
Location: San Rafael, CA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

First a caveat:
I use C# so this is untested with VB.NET

I also had this working under .NET 1.0 and it suddenly stopped after upgrading to .NET 1.1 and VS 2003. After trying lots of different permissions on my box (the suggested fix when the exception is thrown is to alter the permissions using the Security tab for the file - which is unavailable on a XP box running in a workgroup), I took a look at the FileStream class and noticed that the default access is Read/Write, which you would want to fail for an anonymous web user..

So the fix is to change your FileStream constuctors in the ModuleConfig.cs files to the following (note C# syntax):

FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read);

Hope that fixes it for you too!

Clay Ver Valen

  #7 (permalink)  
Old June 19th, 2003, 11:03 PM
Registered User
 
Join Date: Jun 2003
Location: , , .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Excellent. Your fix did it Clay. For anybody else that comes along with this problem, VB syntax is the same as C# syntax...

Thanks for posting,
Tim
  #8 (permalink)  
Old August 2nd, 2003, 08:27 PM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm getting a similar problem. I tried the Filewriter fix & that didn't seem to work. I'm also running XP Pro & this is my first install. I've done everything in the setup html document & was getting the security error mentioned in another post. I then went into my IIS & unchecked my Annonymous access under Directory Security as developerz suggested. Now I'm getting the error below. Can anyone help?

I'm thinking that this may have something to do with the temp folder being read only. Unfortunately, the D:\WINNT\Microsoft.NET\ folders on my computer fall into that weird XP problem where you can't change their attributes (ref. http://support.microsoft.com/default...b;en-us;326549). I've tried the "attrib -r" fix, but that doesn't seem to help, so is there a way to redirect the temp path to another folder that's not read only? What file would I change?

Thank you for your help.

======================================
An unexpected error has occurred on this page. The system administrators have been notified. Please feel free to contact us with the information surrounding this error.

The error occurred in: http://localhost/thephileVB/Default.aspx
Error Message: Unable to generate a temporary class (result=1).

error CS0009: Metadata file 'D:\WINNT\Microsoft.NET\Framework\v1.0.3705\Tempor ary ASP.NET Files\thephilevb\138ff8aa\5c91653a\assembly\dl\061 ed16e\6139f8cb_5059c301\Wrox.WebModules.Polls.Conf iguration.DLL' could not be opened -- 'Access is denied. '
--------------------------------------------------------------------------------
Stack Trace:
System.InvalidOperationException: Unable to generate a temporary class (result=1). error CS0009: Metadata file 'D:\WINNT\Microsoft.NET\Framework\v1.0.3705\Tempor ary ASP.NET Files\thephilevb\138ff8aa\5c91653a\assembly\dl\061 ed16e\6139f8cb_5059c301\Wrox.WebModules.Polls.Conf iguration.DLL' could not be opened -- 'Access is denied. ' at System.Xml.Serialization.Compiler.Compile() at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] xmlMappings) at System.Xml.Serialization.XmlSerializer..ctor(Type type) at Wrox.WebModules.Polls.Configuration.ModuleConfig.G etSettings() in D:\wrox\ThePhile\Modules\Polls2\Polls.Configuratio n\Configuration.cs:line 24 at Wrox.WebModules.Polls.Business.Question.GetCurrent ID() in D:\wrox\ThePhile\Modules\Polls2\Polls.Business\Que stion.cs:line 128 at Wrox.WebModules.Polls.Web.Controls.User.Poll.DataB ind() in D:\wrox\ThePhile\Modules\Polls2\Poll.ascx.cs:line 123 at Wrox.WebModules.Polls.Web.Controls.User.Poll.Page_ Load(Object sender, EventArgs e) in D:\wrox\ThePhile\Modules\Polls2\Poll.ascx.cs:line 114 at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain()
  #9 (permalink)  
Old August 3rd, 2003, 11:00 PM
Registered User
 
Join Date: Aug 2003
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Actually, nevermind. This problem magically solved itself once I updated the .Net Framework with whatever the latest update was.

  #10 (permalink)  
Old August 29th, 2003, 01:35 PM
Registered User
 
Join Date: Aug 2003
Location: , , Germany.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to AHaeusler
Default

Hi all together!

I had the same problems like krista and tworkman, but updating my ASP .NET Framework to version 1.1 and the post of clayv fixed it. Thanks a lot; I think I've tried about four whole days with changing my IIS settings and the ASP .NET Framework settings.

 


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
Parse error: syntax error, unexpected T_ELSE in /h vipin k varghese BOOK: XSLT Programmer's Reference, 2nd Edition 4 September 29th, 2011 01:19 AM
error occurred... craft Dreamweaver (all versions) 1 November 1st, 2008 04:31 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Parse error: syntax error, unexpected T_STRING ginost7 Beginning PHP 1 November 9th, 2007 02:51 AM
error:Exception occurred hastikeyvan Classic ASP Professional 1 September 13th, 2006 04:40 AM



All times are GMT -4. The time now is 07:03 PM.


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