Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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 9th, 2010, 11:18 PM
Authorized User
 
Join Date: May 2008
Location: Arlington, Texas
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Instant Results Survey Engine

I have uploaded Survey Engine in a subdomain folder on my shared hosting. Seems like all pages work well except when I try to login I get following message:

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration


-------------------------------------------------



Then when I add





<configuration>
<
system.web>
<
customErrorsmode="Off"/>
</
system.web>
</
configuration>



I get the follwoing :




Server Error


500 - Internal server error.

There is a problem with the resource you are looking for, and it cannot be displayed.





Can anyone assist with this issue. Do I need to givea folder certain permissions or what to just be able to login ?
  #2 (permalink)  
Old June 10th, 2010, 02:50 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

That's difficult to say without seeing the real error. Here's what you could try:

1. Contact your host and ask them to look in the Event Viewer for the real error message

2. Setup IIS locally and see if you can reproduce the problem.

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!
  #3 (permalink)  
Old June 10th, 2010, 04:08 AM
Authorized User
 
Join Date: May 2008
Location: Arlington, Texas
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have changed the Web.Config file and now I get :


Server Error in '/acrsurvey' Application.

Index was outside the bounds of the array.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IndexOutOfRangeException: Index was outside the bounds of the array.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[IndexOutOfRangeException: Index was outside the bounds of the array.] System.Data.SqlClient.SqlDataReader.ReadColumn(Int 32 i, Boolean setTimeout) +778886 System.Data.SqlClient.SqlDataReader.GetDateTime(In t32 i) +34 System.Web.Security.SqlMembershipProvider.GetPassw ordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +815 System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105 System.Web.Security.SqlMembershipProvider.CheckPas sword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42 System.Web.Security.SqlMembershipProvider.Validate User(String username, String password) +78 System.Web.UI.WebControls.Login.AuthenticateUsingM embershipProvider(AuthenticateEventArgs e) +60 System.Web.UI.WebControls.Login.OnAuthenticate(Aut henticateEventArgs e) +119 System.Web.UI.WebControls.Login.AttemptLogin() +115 System.Web.UI.WebControls.Login.OnBubbleEvent(Obje ct source, EventArgs e) +101 System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37 System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +118 System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +166 System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +10 System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +13 System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +36 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565



I saw this posted somewhere and the database was not checked for read only.

But I did create one database through my MSSQL Web Admin on my hosting account and the scripts I executed into one database and then I pasted the data into the tabels since my hosting has restrictions on remote access. I have SQL Server 2008 and I can not copy or import database. Not sure on how to run a script with all the data in it yet. But I check that database and it is not read only either. So not sure if that information will help or needed but not sure where to go from here. Everything works fine except for logging in. Unless there is a path issue is me just guessing.

I ran the survey on my pc locally and get different error message:


Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.

Source Error:

Line 39: -->Line 40: Line 41: <roleManager enabled="true" />Line 42: <compilation debug="true" strict="false" explicit="true"/>Line 43: <pages>
Source File: C:\inetpub\wwwroot\KDSTechNet\acrsurvey\web.config Line: 41



Show Additional Configuration Errors:

It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. (C:\inetpub\wwwroot\KDSTechNet\acrsurvey\web.confi g line 68)

Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927
  #4 (permalink)  
Old June 10th, 2010, 04:23 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
This error can be caused by a virtual directory not being configured as an application in
That's the cause of the problem: your folder is not marked as an application in IIS

Does your remote database used for membership contain the correct data? E.g. do tables such as aspnet_application contain records?

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!
  #5 (permalink)  
Old June 10th, 2010, 04:56 AM
Authorized User
 
Join Date: May 2008
Location: Arlington, Texas
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yes the data entered in the database was successfully copied to each table and cell correctly. I made sure of that since I could not find a way to do it easier. plus the shared hosting account I have will only allow one MSSQL database unless I upgrade and pay little more to have both dabase files on it. So far merging the database together seems to be ok for now.

I spoke with my hosting and they seem to believe I need to put a default page in the root. So other than that they have no clue and can't assist. I looked through my control panel for IIS and I selected check boxes for directory browsing and set application pool and anonymous access. That did not work either.
  #6 (permalink)  
Old June 10th, 2010, 05:10 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

I *think* I may know what's going on. Did you check the errata for the Index ouut of bounds error: http://www.wrox.com/WileyCDA/WroxTit...Cd-ERRATA.html ?

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!
  #7 (permalink)  
Old June 10th, 2010, 04:45 PM
Authorized User
 
Join Date: May 2008
Location: Arlington, Texas
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I followed the instructions and everything works perfect on my locl pc and on the hosting back to :

Server Error in '/acrsurveys' Application.

Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="Off"/> </system.web></configuration>
Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File --><configuration> <system.web> <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> </system.web></configuration>
  #8 (permalink)  
Old June 11th, 2010, 02:23 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
on the hosting back to :
TThat should also take you back to: "I have changed the Web.Config file and now I get :", doesn't it?

With these kind of errors, it's important to find out what the problem is. It could be configuration, it could be security, it could be the membership database configuration, it could be permissions to that database, and it could be the contents of that database.

Finding out the exact error in step 1. Try turning off custom errrors and ask your host to look in the event viewer.

Alternatively, try sending yourself an e-mail message from Application_Error in Global.asax and get the error message from HttpContext.Current.Server.GetLastError().GetBaseE xception(). Maybe that sheds some light.

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!
  #9 (permalink)  
Old June 11th, 2010, 03:00 PM
Authorized User
 
Join Date: May 2008
Location: Arlington, Texas
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I had a hard time with explaining to my host but I finally figured it out after walking away and come back to the issue with a refreshed mind and figured out that in the Management folder the coding at the top of some the .aspx pages:
<%@PageLanguage="VB"MasterPageFile="~/MasterPage.master"AutoEventWireup="false"CodeFile="Admin.aspx.vb"Inherits="Admin" %>

I changed "~/MasterPage.master" to "../MasterPage.master" and all my pages worked fine and application was letting me log in.

So thank you for your time and help.

  #10 (permalink)  
Old June 12th, 2010, 03:46 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

You're welcome. Glad it's working.

The fix seems to imply that your sub folder is not marked as an application in IIS but is just a simple folder. That may get you in trouble with other functionality....

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!
 


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
Survey Engine Dennis239 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 6 March 3rd, 2008 02:34 PM
Survey Engine anitafn2005 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 5 February 18th, 2007 01:56 AM
Survey engine anitafn2005 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 13 February 11th, 2007 04:49 PM
Survey engine anitafn2005 BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 1 October 8th, 2006 04:17 PM
ASP.NET 2.0 Instant Results Book -Survey Engine autolib BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 9 August 29th, 2006 01:05 AM



All times are GMT -4. The time now is 04:41 AM.


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