Wrox Programmer Forums
|
BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio
This is the forum to discuss the Wrox book ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solution by Vincent Varallo; ISBN: 9780470396865
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 3.5 Enterprise Application Development with Visual Studio 2008: Problem Design Solutio 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 July 27th, 2010, 10:24 AM
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 2
Thanked 0 Times in 0 Posts
Default Debuggin chapter 4

Hi there

I am new to Visual Studio so I am in a learning process and i would appriciate if i could get some support via this forum.

I have created the virtual directory with IIS pointing to the physical directory where the user interface resides.

I have finished chapter 4 and there are no errors.

However when i debug, the browser gives me only a blank page.

can anyone please tell me why is that?

Thank you

MattHoff
 
Old August 3rd, 2010, 07:38 PM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4 blank website

I have the same problem when running the Chapter 4 sample code

What I have done are
1. Config the IIS Virtual Directory as suggested by the Introduction.
1: Run FinalDBScriptData to setup DB.
2. Changed the Data Source to my local SQL server in web.config

<add name="HRPaidTimeOffConnString" connectionString="Data Source=xxx;Initial Catalog=HRPaidTimeOff;User ID=V2Application;Password=wrox" providerName=""/>

Do I need to change the User ID and password in the web.config?

3. Build and debug the site.

4. The site launch the Default.aspx
Since that page is blank, nothing display on the site.
 
Old August 15th, 2010, 11:25 AM
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 2
Thanked 0 Times in 0 Posts
Default Cheers

Hi Stan

i have solved the problem and managed to go further.

I am having a little problem now that i can not solve immediately.

Maybe you can help me.

Basically the application is running using the built in account or anonymous account which on my machine is NETWORK SERVICE.

Since this is an anonymous account to run the application i must take off the virtual method Check Capabilities in the BasePage class and even doing so when i run the application there is no current user displayed on the upper right side and therefore there is no side menu.

I have created a user account in sqlserver management and i can access the database with windows authentication or sql server authentication. I have tried to change the web.config file and used either the user account credentials or integrated security but the problem still persist because the server is using the built in account.

Do you know how to solve this problem or how to create another account that the application will display along with the side menu?

Cheers

Matt
 
Old August 16th, 2010, 01:17 PM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

My site can display my login account as the current user. I use Win 7 to host IIS. What I did were:

1. Go to Computer Manage\Service & Application\ IIS
2. Click your site under default site tree view.
2. Double Click ASP.NET Authorization Rule option on the right panel. Make sure it allows all users
3. Double click IIS authentication option. Make sure
- Anonymous authenticaion is disabled.
- ASP.NET impersonation is enabled.
- Windows authentication is enabled.

4. Restart IIS after config

5. Make sure your webconfig set integrated security = true.
 
Old August 16th, 2010, 02:53 PM
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 2
Thanked 0 Times in 0 Posts
Default Thanks

Hi Stan

thanks for the reply. Really appreciated.

I have tried what you said and it kind of works.

The Integrated authentication apparently is not naturally supported by Mozilla.

When i switched to IE i could see the name of the current user on the up right and it was the administrator of the machine not the one in the Useraccount table, therefore the side menu was not there.

I am thinking how to connect a user account in the table so i can see the side menu as well.

From the book in the web.config file there is a line in the connection string that specify a user id and a password.

Code:
  <add name="HRPaidTimeOffConnString" connectionString="Data Source=VARALLO1;Initial Catalog=HRPaidTimeOff;User ID=V2Application;Password=wrox" providerName=""/>
I am wondering where to find the V2 Application user and password. I know that is created using a query script but is not in the user account table. Also the userAccount table does not have a password field.

There is no point in creating users and roles with asp.net configuration tools because they will not be related to the database tables.

Did you run the script to create the database or have you created the db manually?

Did you modify something in the web.config file in the connection string to connect a user from the UserAccount table in order to see the side menu and apply the appropriate logical functionalities associated with the user?

This is my email [email protected] if you want to send some of your code so i can see it.

Cheers

Matt
 
Old August 16th, 2010, 03:30 PM
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 2
Thanked 0 Times in 0 Posts
Default ...

hi Stan

i was thinking that maybe the problem in not viewing the side menu is with the MenuTree control but as far as i can see i have included all the code and there are no errors.

Also in order to run the application i had to take off the virtual method Checkcapabilities in the base page otherwise i would get an error at this line

Code:
switch (CurrentUser.GetCapabilityAccess(capability.ID, Globals.GetRoles(this.Cache)))
I can't figure out what it is really. The only thing that i can think of is that the server can not map the user which in my case is Administrator of the machine to the systemAdministartor defined in the Useraccount table.

have you finished the book already?

Hope you can help really.

Cheers

Matt
 
Old August 16th, 2010, 06:40 PM
Registered User
 
Join Date: Jul 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default viewing side menu

I haven't tried it yet.

The readme said:

The database script can be found in the "Final DBScript With Data" zip file. This file contains all the
tables and stored procedures that are used within the book. Each table and stored procedure
is defined in the appropriate chapter in the book. You need to create the database in SQL Server 2005
and name it HRPaidTimeOff. Once you have created the database you need to change one record in the
ENTUserAccount table so the WindowsAccountName field contains your Windows logon. Chapter 6 explains
how this table is used in the security model.

let me know if it works after you add your login name to DB, remove "User ID=V2Application;Password=wrox" from the webconfig and set Integrated authentication = true
 
Old August 17th, 2010, 05:58 AM
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Hi Stan

i have created the database without changing the name, created a new connection for the application and a new data context.

I have changed the first row of the UserAccount modifying the WindowsAccountName field, first name and last name.

What do you mean by Windows logon?

I am the administrator of the machine so i access it as Administrator.

The problem however still persist, infact what the application shows me is the Administrator account of the machine and there is no side menu associated with the Administration Tab.

Do you see the side menu on your application? What account name do you see on the upper right? Is it the WindowsAccountName in the UserAccount table or the account of your machine?

There is not even one error in the code except that i had to take off the virtual method CheckCapabilities in the BasePage class to run the application i presume because the server is using the machine account and not the WindowsNameAccount.

Cheers

Matt
 
Old August 18th, 2010, 09:29 AM
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 2
Thanked 0 Times in 0 Posts
Default

hi Stan

sorry if i disturb you.

Can you please tell me if you can see the side menu when you click on the admin tab.

And also can you tell me if you have created any user account on your machine to access the database?

cheers

Matt





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 - Code Download Missing for this Chapter dbaechtel BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 0 August 11th, 2009 11:02 AM
Chapter 2 - End of chapter exercises whizzkid1892 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 1 July 30th, 2008 12:02 PM
Generics chapter 12 difficult chapter i found ...? Larryz C# 2005 1 July 4th, 2007 09:40 PM





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