Wrox Programmer Forums
|
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 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 March 9th, 2004, 03:03 PM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Unable to generate a temporary class (result=1).

An unexpected error has occurred on this page.The system administrators have been notified.
I try to access de default.aspx but always get the following error. I changed my polls.config to fs as new with FileAccess.Read but same result. Any idea ?


The error occurred in:
http://localhost/ThePhileVB/Default.aspx

Error Message:
Unable to generate a temporary class (result=1).
error CS0009: Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\Temp orary ASP.NET Files\thephilevb\bd099721\6bf86bc9\assembly\dl\332 a6843\178886c9_0806c401\Wrox.WebModules.Polls.Conf iguration.DLL' could not be opened -- 'Access denied. '
 
Old March 9th, 2004, 03:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Navigate in Windows Explorer to C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\ and give the ASPNET user account Full Control to the 'Temporary ASP.NET Files' folder.

 
Old March 9th, 2004, 03:07 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Refer to this posting on how to do it:

http://p2p.wrox.com/topic.asp?TOPIC_ID=10774


 
Old March 9th, 2004, 03:37 PM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I read a lot on the subject before sending my problem. I don't have any answer for now. Still have this problem.

I gave permission for temp folder, ASP temporary folder. I work with WIN XP PRO and my DB is on a server name SBS. Any other idea.

System.InvalidOperationException: Unable to generate a temporary class (result=1).
error CS0009: Metadata file 'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705\Temp orary ASP.NET Files\thephilevb\bd099721\6bf86bc9\assembly\dl\332 a6843\f07a6309_0c06c401\Wrox.WebModules.Polls.Conf iguration.DLL' could not be opened -- 'Accès refusé. '

   at System.Xml.Serialization.Compiler.Compile()
   at System.Xml.Serialization.TempAssembly..ctor(XmlMap ping[] xmlMappings)
   at System.Xml.Serialization.XmlSerializer.GenerateTem pAssembly(XmlTypeMapping xmlTypeMapping)
   at System.Xml.Serialization.XmlSerializer..ctor(Type type)
   at Wrox.WebModules.Polls.Configuration.ModuleConfig.G etSettings() in C:\Wrox\ThePhileVB\WebModules\Polls\Polls.Configur ation\ModuleConfig.vb:line 28
   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()


 
Old March 11th, 2004, 08:37 AM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just install SQL-SERVER on my desktop and now, no problem with IIS and SQL-SERVER running in the same location. The app do very well. But if I try to change my connection string in every config file to my server where is the same ThePhile DB, I got the same error than before!!!!

 
Old March 11th, 2004, 08:54 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

How does your (initial) connection string look like?

Is your ASP.NET application running on a different machine than SQL Server?

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old March 11th, 2004, 09:35 AM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 This is my 2 stringd
 1 - sqlConnectionString="data source=SBS;user Id=sa;password="


 
Old March 11th, 2004, 09:38 AM
Authorized User
 
Join Date: Mar 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry, and the other
sqlConnectionString="data source=(local);user Id=sa;password=" This is the good one. The other don't work. If I set identity impersonate to true than I receive an error, if false than I receive an not Trusted blablabla for (sa). I install one SQL-Server ( the one on my desktop ) with SQL and Windows and the other ( on the server) only with Windows authentification.

 
Old March 11th, 2004, 10:07 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

If SQL Server on your Server uses SQL Authentication, you have to make sure that you use a Trusted Connection, and you shouldn't pass a user name and a password in the connection string.

You'll also have to make sure that the SQL Server trusts the account that IIS is running under. Usually this is the MachineName\ASPNET account, or IWAM_MachineName.

In both cases, this is a local account, so you can't directly add these users to SQL Server.
What you could do is create a mirrored account; that is, set an explicit password for the ASPNET account, and created an identical account at the SQL Server with the same password.
Give this user sufficient access to your database and server.

Alternatively, switch to SQL Server authentication and pass a user id and password. IMO, this isn't recommended as it forces you to pass (unencrypted) passwords around.

Search this form for "trusted", "aspnet" and "sql server" for more posts about this subject. For example:
http://p2p.wrox.com/topic.asp?TOPIC_...,server,aspnet
http://p2p.wrox.com/topic.asp?TOPIC_...,server,aspnet



Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to generate a temporary class (result=1). e raolade ASP.NET 1.0 and 1.1 Professional 3 April 2nd, 2007 08:46 AM
Unable to generate a temporary class (result=1) phuongdv ASP.NET 1.0 and 1.1 Basics 3 January 23rd, 2007 09:29 AM
Database unable to show result. (ASP.NET C#) richie86 ASP.NET 1.0 and 1.1 Basics 3 November 10th, 2005 01:59 PM
Unable to open registry key 'Temporary p2ptolu Classic ASP Databases 3 March 7th, 2005 06:49 AM
Temporary Intenet Files + WebClient Class philw86 C# 1 July 6th, 2004 02:15 AM





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