Tuesday, March 27, 2012
count number of rows in asp.net
thanks, JustinSELECT COUNT(*) FROM MyTable|||SELECT COUNT(*) FROM MyTable
ok, so i added COUNT(*) to my SELECT * statement, and i get this error:
Exception Details: System.IndexOutOfRangeException: booking_id...and the only value in booking_id is 1, and there is only one result returned...
Tuesday, March 20, 2012
Could not start the ASP.NET service on local computer.
Error 1069. The service did not start due to login failure.
I can't get a domain login account with domain admin rights to start the service. The only way I can start the service is with the LocalSystem account, which isn't a good solution because it's not networkable.
Thank you for any advice you have.
Does your domain account has "Log on as a service" right?|||Yes. My domain account has it in Active Directory and on the server under Local Security Policy.|||Interesting ... can you run any other service with your domain account? Is this problem specific to RS service?|||I just tested stopping and starting another service with the same domain account and it ran that service successfully. It appears that the problem is just related to SQL Server Reporting Services.|||Perhaps the password changed and your RS service still has the old password? Sorry I can't think of anything else.|||How do I know what password the RS Service has or should be? I know the password hasn't changed for our domain account. I verified it works for other services.
Here is more information:
I have two servers:
One database server: SQL Server 2005 SP1
One web server with IIS running multiple websites with ASP 1.1 and ASP 2.0 and SQL Server 2005 Reporting Services. I configured Reporting Services from my web server where my SQL Server Reporting Services account is that won't login as a domain administrator account with administrator rights and log on as a service rights.
Is there some other type of rights that may be missing related to SQL Server Reporting services?
|||Also, I found that the WebServiceAccount was not set in the RSreportserver.config file in Program Fiels\Microsoft SQL Servre\MSSQL.1\Reporting Services\ReportManager so I set it to IWAM_ComputerName with the ComputerName as the name of my computer. Then I tried restarted the Reporting Services service, but it didn't start. I also can't get the ASP.NET service to start. I tried to start it using the IWAM_ComputerName account, but I need to figure out what the password is for that account to start the service.|||
rsreportserver.config file should be in ...\MSSQL.1\Reporting Services\ReportServer directory. To set web service account, please use the configuration tool. Setting it to IWAM_ account is incorrect. On XP/Win2K, the web service account is by default <MachineName>\ASPNET. On Win2K3 it is the app pool identity of your report server virtual directory.
When you say you can't get ASP.NET to start, what did you try? You shouldn't do anything. The ASP.NET worker process should start when the first request is received.
|||The configuration tool doesn't grab the ASP.NET account web service. It won't pick it up or let me type it in. The service is listed in Services, but wasn't started. The only way it would start was with a login of LocalSystem.
In another website, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=17756&SiteID=1, a Microsoft Lead Reporting Services person, Tudor Trufinescu, recommended added the Web Service Account if it was missing in the config file.
I'll remove it though.
The article also said that if I'm using IIS 5, which I assume I'm using since I have Windows 2000 Advanced Server, that the ASP.NET account should login using MACHINE\ASPNET account. This never worked. I had to change it to the LocalSystem login to work. I thought this problem may be related to the Reporting Services problem since it's an option in the Configuration Tools that isn't configured.
Thank you.
|||The configuration tool should pick up ASP.NET account from machine.config file. It will not let you type in if you are on IIS5. Are you seeing blank "ASP.NET service account" box?
I am still confused when you talk about "starting the service". Which service is this? (What is the name of the service in service controller manager?) RS has a windows service that is named "SQL Server Reporting Services". On IIS side, you don't control ASP.NET worker process identity since you are on Win2K/IIS5.
|||Yes. I am seeing a blank ASP.NET service account box.
The two services I was referencing were:
SQL Server Rerporting Service - will only start with a logon of LocalSystem account - not a good solution because I need to use a domain account that will login across the network into a database.
ASPNET service - will only start with the LocalSystem account. I just mentioned this to note it. Wasn't sure if it also needed to start using some other type of login.
sqlCould not start the ASP.NET service on local computer.
Error 1069. The service did not start due to login failure.
I can't get a domain login account with domain admin rights to start the service. The only way I can start the service is with the LocalSystem account, which isn't a good solution because it's not networkable.
Thank you for any advice you have.
Does your domain account has "Log on as a service" right?|||Yes. My domain account has it in Active Directory and on the server under Local Security Policy.|||Interesting ... can you run any other service with your domain account? Is this problem specific to RS service?|||I just tested stopping and starting another service with the same domain account and it ran that service successfully. It appears that the problem is just related to SQL Server Reporting Services.|||Perhaps the password changed and your RS service still has the old password? Sorry I can't think of anything else.|||How do I know what password the RS Service has or should be? I know the password hasn't changed for our domain account. I verified it works for other services.
Here is more information:
I have two servers:
One database server: SQL Server 2005 SP1
One web server with IIS running multiple websites with ASP 1.1 and ASP 2.0 and SQL Server 2005 Reporting Services. I configured Reporting Services from my web server where my SQL Server Reporting Services account is that won't login as a domain administrator account with administrator rights and log on as a service rights.
Is there some other type of rights that may be missing related to SQL Server Reporting services?
|||Also, I found that the WebServiceAccount was not set in the RSreportserver.config file in Program Fiels\Microsoft SQL Servre\MSSQL.1\Reporting Services\ReportManager so I set it to IWAM_ComputerName with the ComputerName as the name of my computer. Then I tried restarted the Reporting Services service, but it didn't start. I also can't get the ASP.NET service to start. I tried to start it using the IWAM_ComputerName account, but I need to figure out what the password is for that account to start the service.|||
rsreportserver.config file should be in ...\MSSQL.1\Reporting Services\ReportServer directory. To set web service account, please use the configuration tool. Setting it to IWAM_ account is incorrect. On XP/Win2K, the web service account is by default <MachineName>\ASPNET. On Win2K3 it is the app pool identity of your report server virtual directory.
When you say you can't get ASP.NET to start, what did you try? You shouldn't do anything. The ASP.NET worker process should start when the first request is received.
|||The configuration tool doesn't grab the ASP.NET account web service. It won't pick it up or let me type it in. The service is listed in Services, but wasn't started. The only way it would start was with a login of LocalSystem.
In another website, http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=17756&SiteID=1, a Microsoft Lead Reporting Services person, Tudor Trufinescu, recommended added the Web Service Account if it was missing in the config file.
I'll remove it though.
The article also said that if I'm using IIS 5, which I assume I'm using since I have Windows 2000 Advanced Server, that the ASP.NET account should login using MACHINE\ASPNET account. This never worked. I had to change it to the LocalSystem login to work. I thought this problem may be related to the Reporting Services problem since it's an option in the Configuration Tools that isn't configured.
Thank you.
|||The configuration tool should pick up ASP.NET account from machine.config file. It will not let you type in if you are on IIS5. Are you seeing blank "ASP.NET service account" box?
I am still confused when you talk about "starting the service". Which service is this? (What is the name of the service in service controller manager?) RS has a windows service that is named "SQL Server Reporting Services". On IIS side, you don't control ASP.NET worker process identity since you are on Win2K/IIS5.
|||Yes. I am seeing a blank ASP.NET service account box.
The two services I was referencing were:
SQL Server Rerporting Service - will only start with a logon of LocalSystem account - not a good solution because I need to use a domain account that will login across the network into a database.
ASPNET service - will only start with the LocalSystem account. I just mentioned this to note it. Wasn't sure if it also needed to start using some other type of login.
Sunday, February 19, 2012
Could not add ASPNET user to SQL Server.
SQL Server does not exist or access denied.
hey guys can someone help me out on this or point me to another forum with the same problem and the answer this problem thank youcan you post your connection string?|||sure if i really no where to find it|||would this be it
10:37:20 PM Monday, December 01, 2003: [Checking system requirements]
10:37:20 PM Monday, December 01, 2003: [Pass] Detected a local instance of SQL Server.
10:37:20 PM Monday, December 01, 2003: [Pass] Determined SQL Server version (8.00.194).
10:37:20 PM Monday, December 01, 2003: [Pass] Detected .NET Framework.
10:37:20 PM Monday, December 01, 2003: [Pass] Detected Internet Information Server (IIS).
10:37:21 PM Monday, December 01, 2003: [Begin Sample Configuration]
10:37:22 PM Monday, December 01, 2003: [Pass] Created IIS virtual directory.: AspNetForums
10:37:22 PM Monday, December 01, 2003: [Pass] Determined SQL Server version (8.00.194).
10:37:38 PM Monday, December 01, 2003: [Fail] Could not add ASPNET user to SQL Server.
SQL Server does not exist or access denied.
10:37:38 PM Monday, December 01, 2003: [Done]|||<configuration
<configSections>
<section name="AspNetForumsSettings" type="System.Configuration.NameValueFileSectionHandler, System, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections
<system.web
<!-- set debugmode to false for running application -->
<compilation debug="false" /
<!-- set customeErrors off while developing -->
<customErrors mode="RemoteOnly" /
<authentication mode="Forms">
<forms name="AspNetWebAuth" loginUrl="~/login.aspx" protection="None" timeout="60" />
</authentication
</system.web
<!-- ASP.NET Forums Config Settings -->
<!--
******************************
Data Provider
-->
<AspNetForumsSettings>
<add key="DataProviderAssemblyPath" value="AspNetForums.dll" /
<!--
******************************
Application Settings
******************************
-->
<add key="availableSkins" value="default;LightBlue"/>
<add key="defaultPageSize" value="25"/>
<add key="connectionString" value="server=localhost;Trusted_Connection=true;database=" />
<add key="defaultDateFormat" value="dd MMM yyyy"/>
<add key="defaultTimeFormat" value="hh:mm tt"/>
<add key="pathToTransformationFile" value="/transform.txt" />
<add key="smtpServer" value="default" /> <!-- Can specify SMTP Server to use to send out emails. Use "default" to use the default Windows 2000 SMTP Server -->
<add key="allowDuplicatePosts" value="false" /><!-- Whether or not you wish to allow messages with duplicate bodies being posted in various forums -->
<add key="dbTimeZoneOffset" value="-6" /><!-- The timezone offset of your database server. (GMT is +0; EST = -5;) -->
<add key="siteName" value="ASP.NET Forums" /><!-- The name of your AspNetForums.NET Web site. -->
<add key="DataProviderClassName" value="AspNetForums.Data.SqlDataProvider" />
<add key="urlWebSite" value="http://localhost" /
<!--
If the ASP.NET Forums are configured to run in a directory that is not
an IIS VRoot, provide the name of that directory here.
<add key="forumsDirectory" value="/Forums" />
--
<!--
******************************
URL Resource Paths
******************************
urlHome - the Url to the home of the application
urlShowPost - The Url to show a particular post.
urlShowAllUsers - The Url to show all users.
urlSearch - The Url to show the search page.
urlSearchForUser - Searchs for posts by a given user.
urlRegister - The Url to register as a user.
urlProfile - The Url to view a user profile.
urlLogin - The Url to redirect the user to in order to login.
urlLogout - The Url to redirect a user to when they opt to logout.
urlShowForum - The Url to show a particular forum.
urlShowForumGroup - The Url to show a particular forum group.
urlShowUserInfo - The Url to show a particular user's information.
urlReplyToPost - The Url to post a reply to an existing post.
urlAddNewPost - The Url to post a new message.
urlEditExistingPostFromModeration - The Url to edit an existing post from the moderation system.
urlEditExistingPostFromAdmin - The Url to edit an existing post from the administration screen.
urlPostModeration - The Url to moderate posts awaiting approval.
urlEditForum - The Url to edit an existing forum.
urlCreateForum - The Url to create a new forum.
urlShowForumsPostsForAdmin - The Url to show a forums posts for editing/deletign (only available through the administration page).
Note, the '&' symbol cannot be parsed all '&' in URL are replaced with '^'
-->
<add key="urlHome" value="/Default.aspx" />
<add key="urlShowPost" value="/ShowPost.aspx?PostID=" />
<add key="urlShowAllUsers" value="/User/ShowAllUsers.aspx" />
<add key="urlSearch" value="/Search/default.aspx" />
<add key="urlQuickSearch" value="/Search/default.aspx?searchText=" />
<add key="urlSearchForPostsByUser" value="/Search/default.aspx?SearchFor=1^SearchText=" />
<add key="urlRegister" value="/User/CreateUser.aspx" />
<add key="urlEditUserProfile" value="/User/EditUserProfile.aspx" />
<add key="urlLogin" value="/login.aspx" />
<add key="urlAdmin" value="/Admin/default.aspx" />
<add key="urlAdminEditUser" value="/Admin/EditUser.aspx?Username=" />
<add key="urlLogout" value="/logout.aspx" />
<add key="urlShowForum" value="/ShowForum.aspx?ForumID=" />
<add key="urlShowForumGroup" value="/ShowForumGroup.aspx?ForumGroupID=" />
<add key="urlShowUserProfile" value="/User/UserProfile.aspx?UserName=" />
<add key="urlReplyToPost" value="/AddPost.aspx?PostID=" />
<add key="urlUserEditPost" value="/EditPost.aspx?PostID=" />
<add key="urlAddNewPost" value="/AddPost.aspx?ForumID=" />
<add key="urlMyForums" value="/User/MyForums.aspx" />
<add key="urlChangePassword" value="/User/ChangePassword.aspx" />
<add key="urlForgotPassword" value="/User/EmailForgottenPassword.aspx" />
<add key="urlModeration" value="/Moderate/default.aspx" />
<add key="urlModerateForumPosts" value="/Moderate/ModerateForum.aspx?ForumId=" />
<add key="urlEditPost" value="/Moderate/EditPost.aspx?PostID=" />
<add key="urlDeletePost" value="/Moderate/DeletePost.aspx?PostID=" />
<add key="urlManageForumPosts" value="/Moderate/ManageForum.aspx?ForumId=" />
<add key="urlMovePost" value="/Moderate/MovePost.aspx?PostID=" />
<add key="urlModerateThread" value="/Moderate/ModerateThread.aspx?PostId=" />
<add key="urlEditForum" value="/Admin/EditForum.aspx?ForumID=" />
<add key="urlCreateForum" value="/Admin/CreateNewForum.aspx" />
<add key="urlShowForumPostsForAdmin" value="/Admin/ShowPosts.aspx?ForumID=" />
<add key="urlMessage" value="/Msgs/default.aspx?MessageId=" />
<add key="urlModerationHistory" value="/Moderate/ModerationHistory.aspx?PostId=" />
</AspNetForumsSettings
<!--
This location tag is used to ensure that only authenticated users can add a new post or reply to
an existing post...
-->
<location path="AddPost.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location
<location path="EditPost.aspx">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location
</configuration>|||The user account that you are running the script under needs to have permissions in SQL Server to add a login for the ASPNet user. Are you logged on as a local administrator?
Cheers
Ken|||i am really not sure can u be lil more specific how will no if i am loged in or how i can log into the sql server|||If you are using Windows Integrated Authentication with SQL Server, then your Windows account needs appropriate permissions in SQL Server to be able to add new users to SQL Server.
I suggest you logon as an administrator and run the script. Otherwise, if you are using Mixed Mode security, then you should run the script under "sa" account.
The different security modes are discussed in SQL Server Books Online
Cheers
Ken|||well am running windows xp professional and my user name is has adminastative access|||well i am on windows xp pro and my user account is admin so how do i make my windows have appropriate permission in sql server|||I know above posts are a little dated but i thought that it would be nice to finish up the post.
I think the solution to the problem is to add the user account of the IIS server (typically: IUSR_<computername> ) as a trusted user on SQL server:
<computername>\IUSR_<computername
As for security concerns, I guess that would be up to those configuring thier machines to decide if this is the approach for them.
Could not add ASPNET user to SQL Server -Help plz-
this is my log file i got
1:17:51 PM Monday, September 22, 2003: [Checking system requirements]
1:17:51 PM Monday, September 22, 2003: [Pass] Detected a local instance of SQL Server.
1:17:51 PM Monday, September 22, 2003: [Pass] Determined SQL Server version (8.00.194).
1:17:51 PM Monday, September 22, 2003: [Pass] Detected .NET Framework.
1:17:51 PM Monday, September 22, 2003: [Pass] Detected Internet Information Server (IIS).
1:17:54 PM Monday, September 22, 2003: [Begin Sample Configuration]
1:17:56 PM Monday, September 22, 2003: [Pass] Created IIS virtual directory.: AspNetForums
1:17:56 PM Monday, September 22, 2003: [Pass] Determined SQL Server version (8.00.194).
1:18:14 PM Monday, September 22, 2003: [Fail] Could not add ASPNET user to SQL Server.
SQL Server does not exist or access denied.
1:18:14 PM Monday, September 22, 2003: [Done]Does the user you are currently logged in as have rights to the sql server in question?|||What you mean about (as logged in as have rights to the sql server )?
-ok my SQL server is runing on my machine the server i am on it see like nothing wrong !
Still not understand why i could not add ASPNET user to SQL Server on the intallation AspNetForumsSetup|||You may want to try adding the user manually to the sql server. Sorry, I'm not sure what the problem is. I have never tried to install AspNetForumsSetup.