 |
BOOK: Beginning ASP.NET 4.5 : in C# and VB
 | This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning ASP.NET 4.5 : 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
|
|
|
|
|

September 2nd, 2013, 04:21 PM
|
|
Authorized User
|
|
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
I don't see where I can attach screen shots. So I'm going to create a web page and post the link with screen shots of my IIS set up.
I will edit this and post them when I get finish.
Thanks!
|
|

September 2nd, 2013, 04:22 PM
|
|
Authorized User
|
|
Join Date: Jun 2013
Posts: 36
Thanks: 1
Thanked 4 Times in 4 Posts
|
|
Quote:
Originally Posted by maurices5000
Unhandled Exception: System.TimeoutException: The request channel timed out while waiting for a reply after 00:00:58.8749356. Increase the timeout value passed to the call to Request or increase the SendTimeout value on the Binding. The time allotted to this operation may have been a portion of a longer timeout. ---> System.TimeoutException: The HTTP request to' http://localhost/ProductsService/Service.svc' has exceeded the allotted timeout of 00:00:59.0370000. The time allotted to this operation may have been a portion of a longer timeout. ---> System.Net.WebException: The operation has timed out
|
This says that localhost/ProductsService/Service.svc does not answer.
IMHO: Make sure that the service reference is correct.
|
|

September 2nd, 2013, 04:42 PM
|
|
Authorized User
|
|
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
I'll see if i can delete it and recreate it.
Thanks!
|
|

September 2nd, 2013, 05:13 PM
|
|
Authorized User
|
|
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
HEre are my screen shots. If you need a description I can provide one. This is IIS. I have deleted and recreated the Service reference yet and I'll do the SSMS screen shots in a minute.
http://www.secondchoice.org/2ndchoice/iis.htm
|
|

September 2nd, 2013, 05:23 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
The error message with "Invalid application path" is interesting. What are the permissions on disk for the ProductsService folder? Did you add the app pool account to the list of users with at least read permissions? Are there any specific deny permissions set?
Imar
|
|

September 2nd, 2013, 05:47 PM
|
|
Authorized User
|
|
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
I gave full access to IUSR and Network Service for everything in the wwwroot directory. So those two users have full access. Should i have added the ASP.NET v4.0 application pool as a user?
WHen i try to add ASP.NET v4.0 as a user i get this error: "An object named "ASP.NET v4.0" cannot be found. Check the selected object types and location for accuracy and ensure that you typed the object name correctly, or remove this object from the selection."
There are NO denies
Regarding Server Reference, I copied the code from Book Download and made the changes to the config files and re-published the site. It gives me the exact same error.
Last edited by maurices5000; September 2nd, 2013 at 05:56 PM..
|
|

September 2nd, 2013, 06:02 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, you need to add IIS APPPOOL\ASP.NET v4.0 as well. You won't find it in the list of users but if you type it directly, it works.
My book has more details; searching for IIS apppool should show you where (can't check right now)
cheers,
Imar
|
|
The Following User Says Thank You to Imar For This Useful Post:
|
|
|

September 2nd, 2013, 06:10 PM
|
|
Authorized User
|
|
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
HEre is my SQL Server Information
http://www.secondchoice.org/2ndchoice/ssms.htm
I was able to all the fully qualifed name rather than the shorted named I used. That by itself did not solve the problem. I'm going to read your book and see what else it says.
Thanks Looks like its in Appendix B Configuring SQL Server 2012
Last edited by maurices5000; September 2nd, 2013 at 06:27 PM..
|
|

September 2nd, 2013, 11:28 PM
|
|
Authorized User
|
|
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Thank guys for your help. At this point, I've read all of Chapter 19 and Appendix B. I understand a lot more than I did and it was a pleasure to read. Very easy to follow. I'm hoping the last part of Appendix B will fix my problem, but I don't understand it. This post is all about Appendix B the next post will tell you what I've done.
I'm in the last section of Appendix B and I don't understand it: "Configuring Application Services" Its the only thing so far I don't understand.
I'm not sure what the following statement means. Was this covered in Ch 19 and Appendix B?
Quote:
|
Earlier in this book you learned that the ASP.NET application services make use of a SQL Server database. You also saw how to make sure your own website and the application services use the same database.
|
Quote:
Follow these steps to let the application services use your own database:
1. First, make sure the application services point to a connection string you want to use. To do this, you need to set the connectionStringName to a connectionstring defined in your config file. The following example shows how to do this for the Membership section, but the other services follow a similar pattern: (I'm assuming this is in Web.Config. Its not in mine.)
< membership defaultProvider =" DefaultMembershipProvider" > < providers >
< add name =" DefaultMembershipProvider" type =" System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version = 1.0.0.0, Culture = neutral, PublicKeyToken = 31bf3856ad364e35" connectionStringName ="PlanetWroxConnectionString1" enablePasswordRetrieval =" false" enablePasswordReset =" true" requiresQuestionAndAnswer =" false" requiresUniqueEmail =" false" maxInvalidPasswordAttempts =" 5" minRequiredPasswordLength =" 7" minRequiredNonalphanumericCharacters =" 1" passwordAttemptWindow =" 10" applicationName ="/" /> </ providers >
</ membership >
Notice how connectionStringName points to the connection string called PlanetWroxConnectionString1, defined elsewhere in the config file.
|
Quote:
(I didn't think this one was necessary. But i can do it if i need to. This is in SSMS.)
2. Make sure the account used by the web server has permissions to alter the database schema. You can accomplish this by adding the account to the db_ddladmin group, shown in Figure B. 6 . This grants the account the permissions to execute Data Definition Language statements , which means it can create and alter tables and other objects in the database.
|
I don't know what the following means:
Quote:
|
4. Browse to your site and request the Login page. Try to log in with a fake username and password. At this stage, the .NET run time will modify the database and add the necessary tables to it. If you look in the database defined in the connection string used by the membership services, you'll notice it now contains the tables that are used by Membership, Roles, and Profile.
|
|
|

September 3rd, 2013, 12:13 AM
|
|
Authorized User
|
|
Join Date: Aug 2013
Posts: 24
Thanks: 7
Thanked 0 Times in 0 Posts
|
|
Guys! Its working.
Thanks A MILLION!!!!!
I was typing the below beforehand. I'll keep it for future reference. The Test Setting button in IIS Basic Setting still fails. But when i run the app now in VS2010, it works like its supposed to. I hope I'm not deceiving myself. Could it be running off VS Development Server?
Ok What I've done is I added both IIS APPPOOL\ASP.NET v4.0 and IIS APPPOOL\DefaultAppPool to the SQL SERVER's Security Logins. The Book author's aspnet.sql script had already added them to the AdventureWorks database.
I added them both to the file permissions at C:\inetpub\wwwroot, giving them full access.
I clicked the Advanced button at the bottom of the Security tab. Clicked Change Permissions and clicked the checkbox that says Replace All Child Object Permissions check box. ((It did not stay checked however).
|
|
 |
|