Showing posts with label page. Show all posts
Showing posts with label page. Show all posts

Monday, March 19, 2012

Assistance with Stored Procedure and ASPX Page Needed

Hello, I have the following stored procedure and the following aspx page. I am trying to connect this aspx page to the stored procedure using the SqlDataSource. When the user enters a branch number in textbox1, the autonumber generated by the database is returned in textbox2. I am not quite sure what to do to get this to execute. Can someone provide me assistance? Will I need to use some vb.net code behind?

Stored Procedure

CREATE PROCEDURE InsertNearMiss @.Branch Int, @.Identity int OUT ASINSERT INTO NearMiss (Branch)VALUES (@.Branch)

SET @.Identity = SCOPE_IDENTITY()

GO

ASPX Page

<asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionString="<%$ ConnectionStrings:NearMissConnectionString%>" InsertCommand="InsertRecord"InsertCommandType="StoredProcedure"SelectCommand="InsertRecord" SelectCommandType="StoredProcedure"> <SelectParameters> <asp:ControlParameterControlID="TextBox1"Name="Branch"PropertyName="Text"Type="Int32"/> <asp:ControlParameterControlID="TextBox2"Direction="InputOutput"Name="Identity"PropertyName="Text"Type="Int32"/> </SelectParameters> <InsertParameters> <asp:ParameterName="Branch"Type="Int32"/> <asp:ParameterDirection="InputOutput"Name="Identity"Type="Int32"/> </InsertParameters> </asp:SqlDataSource> <asp:TextBoxID="TextBox1"runat="server"></asp:TextBox>

<asp:TextBoxID="TextBox2"runat="server"></asp:TextBox>

Here's all about getting the value of the most recently added record:http://www.mikesdotnetting.com/Article.aspx?ArticleID=54

SqlDataSource options are about 3/4 of the way down.

|||

It appears you are only doing an insert, so you can get rid of the whole <selectParameters> collection. In this case, I would create a handler for onInserted and have the handler insert the output value from the procedure into the textbox 2 box. To fire the event, put a button that has an onclick event handler that calls SqlDataSource1.Insert(). This fires the insert command of the datasource. Below is an example page and codebehind

12 id="testSource"3runat="server"4InsertCommand="usp_ins_test"5InsertCommandType="StoredProcedure"6ConnectionString='<%$ ConnectionStrings:test %>'7OnInserted="testSource_Inserted">89"TextBox1" Name="prm_b" Direction="Input" Type="int32" PropertyName="Text">10"prm_r" Direction="Output" Type="Int32">111213branch: "TextBox1" runat="server">
14returnedvalue: "TextBox2" runat="server">15"btnSubmit" runat="server" Text="Add New Branch" OnClick="btnSubmit_Click"/>
 Code Behind:
 
protected void btnSubmit_Click(object sender, EventArgs e) {if (Page.IsValid) { testSource.Insert(); } }protected void testSource_Inserted(object sender, SqlDataSourceStatusEventArgs e) {if (e.Exception !=null)//display an error message to the screen e.ExceptionHandled =true;else TextBox2.Text = e.Command.Parameters["@.prm_r"].Value.ToString(); }

That should do it.

--D

assigning values to parameters dynamically

i using a bound data grid which is using a stored proc. The stored proc needs the ClientID "if logged in" there is no form or control on the page outside of the loginstatus. I am wanting to pass theMembership.GetUser.ProviderUserKey.ToString() to the asp:parameter but I cant get it to work.

So How do I pass a variable to a stored proc parameter using a bound data grid.

I this its very strange that this cant be dont and there are a raft of reason why you wold want to do this with out the need to pass it to a form control.

please help

jim

Add the parameter to you parameters collection as a normal asp:parameter, then hook up to the data-source control's Inserting/Updating evnet (I assume you use a data-source control with the grid) and use the event argument to get access to the command object's parameters collection (if you use SqlDataSource), or the InputParameters if you use the ObjectDataSource.|||Or alternatively, when the user authenticates, store their id in a session variable, then anywhere in your app you can add it as a session parameter.

Thursday, March 8, 2012

Assigning a unique ID

I have an asp page in which the user completes some information and the data
is stored in an SQL database. I want to automatically assign an unique ID
number (can start with 1) to each record when the data is saved to the
database and display this number on the confirmation page.
This is probably much easier that I am making it. Any help would be
appreciated.
Thanks,CREATE TABLE dbo.CustomerData
(
CustomerDataID INT IDENTITY(1,1),
SomeData VARCHAR(32)
)
GO
CREATE PROCEDURE dbo.AddCustomerData
@.SomeData VARCHAR(32),
@.CustomerDataID INT OUTPUT
AS
BEGIN
SET NOCOUNT ON;
INSERT dbo.CustomerData(SomeData) SELECT @.SomeData;
SET @.CustomerDataID = SCOPE_IDENTITY();
END
GO
DECLARE @.id INT;
EXEC dbo.AddCustomerData 'foo', @.id OUTPUT;
SELECT new_id = @.id;
SELECT CustomerDataID, SomeData FROM dbo.CustomerData;
"Ken D." <KenD@.discussions.microsoft.com> wrote in message
news:DDAB88EE-9D62-499F-9D02-BFA99948B222@.microsoft.com...
>I have an asp page in which the user completes some information and the
>data
> is stored in an SQL database. I want to automatically assign an unique ID
> number (can start with 1) to each record when the data is saved to the
> database and display this number on the confirmation page.
> This is probably much easier that I am making it. Any help would be
> appreciated.
> Thanks,|||Do I drop this code on the asp page?
"Aaron Bertrand [SQL Server MVP]" wrote:

> CREATE TABLE dbo.CustomerData
> (
> CustomerDataID INT IDENTITY(1,1),
> SomeData VARCHAR(32)
> )
> GO
> CREATE PROCEDURE dbo.AddCustomerData
> @.SomeData VARCHAR(32),
> @.CustomerDataID INT OUTPUT
> AS
> BEGIN
> SET NOCOUNT ON;
> INSERT dbo.CustomerData(SomeData) SELECT @.SomeData;
> SET @.CustomerDataID = SCOPE_IDENTITY();
> END
> GO
> DECLARE @.id INT;
> EXEC dbo.AddCustomerData 'foo', @.id OUTPUT;
> SELECT new_id = @.id;
> SELECT CustomerDataID, SomeData FROM dbo.CustomerData;
>
>
>
> "Ken D." <KenD@.discussions.microsoft.com> wrote in message
> news:DDAB88EE-9D62-499F-9D02-BFA99948B222@.microsoft.com...
>
>|||No, this is T-SQL code, not ASP code. For some help running the stored
procedure from ASP, see an ASP newsgroup, if these articles don't clear it
up:
http://www.aspfaq.com/2201
http://www.aspfaq.com/params.htm
"Ken D." <KenD@.discussions.microsoft.com> wrote in message
news:A33184A6-09AF-4CF8-AB13-44009E40E7CB@.microsoft.com...
> Do I drop this code on the asp page?|||Gasp! No, you copy / paste it into the OnBlur event your website's flaming
logo. Please tell me this is not a e-commerce, financial, or defense related
website!
"Ken D." <KenD@.discussions.microsoft.com> wrote in message
news:A33184A6-09AF-4CF8-AB13-44009E40E7CB@.microsoft.com...
> Do I drop this code on the asp page?
> "Aaron Bertrand [SQL Server MVP]" wrote:
>|||Are you kidding. It is just an company Intranet page.
Man, if they let me program fo rthe feds, look out...lol
Just trying to automate a process.
Let me ask this on the example from Aaron.
I get that dbo.CustomerData is my DB name (Compliance). My ID field is
called RequestID so is that CustomerDataID or SomeData? What would the othe
r
one be (the name of the table?).
Sorry, not a programmer by trade but I certainly appreciate the help...
"JT" wrote:

> Gasp! No, you copy / paste it into the OnBlur event your website's flaming
> logo. Please tell me this is not a e-commerce, financial, or defense relat
ed
> website!
> "Ken D." <KenD@.discussions.microsoft.com> wrote in message
> news:A33184A6-09AF-4CF8-AB13-44009E40E7CB@.microsoft.com...
>
>|||OK, it takes me awhile to grasp the concept but here is what I got:
CREATE TABLE dbo.CommunityService
(
RefNum Int IDENTITY(1,1),
BranchDept VARCHAR(75),
Region VARCHAR(50),
EmployeeName VARCHAR(50),
CompletedBy VARCHAR(50),
Organization VARCHAR(125),
Contacts VARCHAR(50),
Phone VARCHAR(50),
Address VARCHAR(255),
CensusArea NTEXT,
ServiceType NTEXT,
ServiceDesc NTEXT,
BenefitDesc NTEXT,
MoneyEquip NTEXT,
Comments NTEXT,
TimeStamp DATETIME
)
GO
CREATE PROCEDURE dbo.AddRequestID
@.Region VARCHAR(50),
@.RefNum INT OUTPUT
AS
BEGIN
SET NOCOUNT ON;
INSERT dbo.CommunityService(Region) SELECT @.Region;
SET @.RefNum = SCOPE_IDENTITY();
END
GO
DECLARE @.id INT;
EXEC dbo.AddRequestID, @.id OUTPUT;
SELECT new_id = @.id;
SELECT RefNum, Region FROM dbo.CommunityService;
My question is that I am getting an error on Line 3 near ','. It all seems
OK so what am I missing?
********************************
"Ken D." wrote:
> Are you kidding. It is just an company Intranet page.
> Man, if they let me program fo rthe feds, look out...lol
> Just trying to automate a process.
> Let me ask this on the example from Aaron.
> I get that dbo.CustomerData is my DB name (Compliance). My ID field is
> called RequestID so is that CustomerDataID or SomeData? What would the ot
her
> one be (the name of the table?).
> Sorry, not a programmer by trade but I certainly appreciate the help...
> "JT" wrote:
>|||> My question is that I am getting an error on Line 3 near ','. It all
> seems
> OK so what am I missing?
Part of the code sample I sent. What does this mean?

> EXEC dbo.AddRequestID, @.id OUTPUT;
You forgot to include your region parameter:
EXEC dbo.AddRequestID 'NorthEast', @.id OUTPUT;|||Cool. I added 'test" and changed my seed to 0. It worked wonderful.
Thanks and so sorry for the ignorance.
Have a great day Aaron.
"Aaron Bertrand [SQL Server MVP]" wrote:

>
> Part of the code sample I sent. What does this mean?
>
> You forgot to include your region parameter:
> EXEC dbo.AddRequestID 'NorthEast', @.id OUTPUT;
>
>
>
>|||Aaron,
One last question. What is I wanted to add a prefix to the ID. Is that
possible?
"Aaron Bertrand [SQL Server MVP]" wrote:

> CREATE TABLE dbo.CustomerData
> (
> CustomerDataID INT IDENTITY(1,1),
> SomeData VARCHAR(32)
> )
> GO
> CREATE PROCEDURE dbo.AddCustomerData
> @.SomeData VARCHAR(32),
> @.CustomerDataID INT OUTPUT
> AS
> BEGIN
> SET NOCOUNT ON;
> INSERT dbo.CustomerData(SomeData) SELECT @.SomeData;
> SET @.CustomerDataID = SCOPE_IDENTITY();
> END
> GO
> DECLARE @.id INT;
> EXEC dbo.AddCustomerData 'foo', @.id OUTPUT;
> SELECT new_id = @.id;
> SELECT CustomerDataID, SomeData FROM dbo.CustomerData;
>
>
>
> "Ken D." <KenD@.discussions.microsoft.com> wrote in message
> news:DDAB88EE-9D62-499F-9D02-BFA99948B222@.microsoft.com...
>
>

Saturday, February 25, 2012

aspx vb sql parameter passing

Hello,
Can someone kindly point out what is wrong with the following code file. I'm trying to:
- fill a dropdown from a db on page load (this works!)
- when user selects from the list and hits a button, pass the dropdown value to a second query
- use the second query to make another call to the db and fill a data grid

In the code below, if I swap an actual value (eg '1005') into the command and comment out the .Parameter.Add statements, the dategrid is filled sucessfully. Otherwise, when the button is pressed, nothing is displayed.

Thanks

PS comments about my coding approach are welcome - I'm new to aspx...


<%@. Language="VBScript" Debug="true"%>
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.data.SqlClient" %>
<html>
<head>
<script language="vb" runat="server">
Dim dbConnection As SqlConnection
Dim ds_Teams,ds_Agents As DataSet
Dim sqlCmd_Teams,sqlCmd_Agents As SqlDataAdapter

Dim dbConn = "server=csacd01;uid=mpierce;pwd=cabledog;database=clearviewacd"

Dim sql_select_teams = "" & _
"SELECT team_no, team_name " & _
"FROM dbo.team " & _
"WHERE (team_status = 'Curr')"

Dim sql_select_agents = "" & _
"SELECT last_name + ', ' + first_name AS name, agent_no " & _
"FROM dbo.users " & _
"WHERE (team_no = @.Team) AND (NOT (agent_no = '1029')) " & _
" AND (NOT (last_name IS NULL)) " & _
" AND (NOT (first_name IS NULL)) " & _
" AND (NOT (first_name = 'FirstName')) " & _
"ORDER BY last_name"

Dim teamList = "teamList"
Dim agentList = "agentList"

Sub Page_Load(Sender As Object, E As EventArgs)
if not (IsPostBack)
ds_Teams = new DataSet()
dbConnection = New SqlConnection(dbConn)
sqlCmd_Teams = New SqlDataAdapter(sql_select_teams, dbConnection)
sqlCmd_Teams.Fill(ds_Teams, teamList)
dbConnection.close()

dropdownlist_Teams.DataSource=ds_Teams.Tables(teamList).DefaultView
dropdownlist_Teams.DataBind()
end if
End Sub

sub Get_Agents(Sender As Object, E As EventArgs)
ds_Agents = new DataSet()
dbConnection = New SqlConnection(dbConn)
sqlCmd_Agents = new SqlDataAdapter(sql_select_agents, dbConnection)

sqlCmd_Agents.SelectCommand.Parameters.Add(new SqlParameter("@.Team", SqlDbType.NVarChar,4))
sqlCmd_Agents.SelectCommand.Parameters("@.Team").Value = dropdownlist_Teams.DataValueField

sqlCmd_Agents.Fill(ds_Agents,agentList)

dbConnection.close()

datagrid_Agents.DataSource=ds_Agents.Tables(agentList).DefaultView
datagrid_Agents.DataBind()
end sub

</script>
</head>
<body>
<form runat="server">
<asp:DropDownList id="dropdownlist_Teams" runat="server"
DataTextField="team_name"
DataValueField="team_no">
</asp:DropDownList
<input type="submit" onserverclick="Get_Agents" value="Get Agents" runat="server"><br /
<ASP:DataGrid id="datagrid_Agents" runat="server"
Width="500"
BackColor="#ccccff"
BorderColor="black"
ShowFooter="false"
CellPadding=3
CellSpacing="0"
Font-Name="Verdana"
Font-Size="8pt"
HeaderStyle-BackColor="#aaaadd"
EnableViewState="false"
/>
</form>
</body>
</html>

(1) dim a variable as string and then assign the sql stmt to the variable.
xample :
dim str1 as string
str1="Select..."

(2) is the valuefield numeric or string type ? also you might want to move the assigning of the str stmt to the get_events event itself rather than declaring it as a global string.

hth

AspX Page Connection Error using sqlserver

Dear i am using visual studio.net........ when i connect database (in sqlserver) using sqldataAdapter with datagrid in visual basic.net every thing work properly......... but when i use the same in asp.net then i get an error message on the resultant explorer page give below.

Server Error in '/studentData' Application.
------------------------

Login failed for user 'RAMIZSARDAR\ASPNET'.
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.Data.SqlClient.SqlException: Login failed for user 'RAMIZSARDAR\ASPNET'.

Source Error:

Line 85: 'Put user code to initialize the page here
Line 86: Dim ds As New DataSet()
Line 87: SqlDataAdapter1.Fill(ds)
Line 88: DataGrid1.DataSource = ds.Tables(0)
Line 89: DataGrid1.DataBind()

Source File: c:\inetpub\wwwroot\studentData\WebForm1.aspx.vb Line: 87

Stack Trace:

[SqlException: Login failed for user 'RAMIZSARDAR\ASPNET'.]
System.Data.SqlClient.SqlConnection.Open()
System.Data.Common.DbDataAdapter.QuietOpen(IDbConnection connection, ConnectionState& originalState)
System.Data.Common.DbDataAdapter.Fill(Object data, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
studentData.WebForm1.Page_Load(Object sender, EventArgs e) in c:\inetpub\wwwroot\studentData\WebForm1.aspx.vb:87
System.Web.UI.Control.OnLoad(EventArgs e)
System.Web.UI.Control.LoadRecursive()
System.Web.UI.Page.ProcessRequestMain()

------------------------
Version Information: Microsoft .NET Framework Version:1.0.3705.0; ASP.NET Version:1.0.3705.0

Plz solve my problem and Reply me on ramiz_ch@.hotmail.com
Plz solve my problem and Reply me on ramiz_ch@.hotmail.com
Plz solve my problem and Reply me on ramiz_ch@.hotmail.com

Ramizwell, yes. if you use the same code in VB.NET/WIndows forms it'll run under the security context of the currently logged-in user. i.e. YOU.

under ASP.NET it runs by default as the ASP.NET guest account, MACHINENAME\ASPNET

you need to add ASPNET to the SQL Server permissions list, OR run ASP.NET as a different user, OR specify a SQL Server auth account in your connection string.

this question has been covered over and over in these forums. try the FAQ, if it's not in there I'll be shocked and amazed.

aspx page and Reporting Service

Generally, when I type http://MyServer/Reports in the location, it takes me
to the home page. On that page I see a bar with "New Folder", "New Data
Souce", "Upload File" and "Show Details" options. Below that I see "Sales
Reports" and "SampleReports" folders. Clicking those links it takes us to
the list of reports.
How can I add a folder there called "Maintenance" (Where I see "Sales
Reports" and "SampleReports" folders i.e Home page). Clicking that link it
should list all Maintenance programs available (For Example, "ReasonCodes").
That link should take us to the aspx page.
Any Suggestions?It sounds like you're trying to mix aspx pages and report manager pages.
That's not really possible using the default Report Manager. You can either
build a custom report manager that replaces the user interface, or have a
separate "Maintenance" web virtual root.
You might be able to pull this off by simply creating a report that is
nothing but links to maintenance pages that sit outside of (next to)
Reporting Services.
So the URLs would look like this:
/Reports/Folder1
/Reports/Folder1/Report1
/Reports/Folder1/Report2
/Reports/Maintenance < report with links
etc.
/Maintenance/ReasonCodes.aspx < regular ASP.NET page in separate virtual
directory from reporting
Cheers,
--
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"RA" <rchaudhary-nospam@.storis.com> wrote in message
news:%23RDhI$NzEHA.2624@.TK2MSFTNGP11.phx.gbl...
> Generally, when I type http://MyServer/Reports in the location, it takes
> me to the home page. On that page I see a bar with "New Folder", "New Data
> Souce", "Upload File" and "Show Details" options. Below that I see "Sales
> Reports" and "SampleReports" folders. Clicking those links it takes us to
> the list of reports.
> How can I add a folder there called "Maintenance" (Where I see "Sales
> Reports" and "SampleReports" folders i.e Home page). Clicking that link it
> should list all Maintenance programs available (For Example,
> "ReasonCodes"). That link should take us to the aspx page.
> Any Suggestions?
>|||Unfortunately, the list of reports or main view of Reporting Services is not
customizable. What you see is what you get. As you add more objects,
reports, folders, files, etc. Reporting Services will manage the list & menu
choices for you.
"RA" wrote:
> Generally, when I type http://MyServer/Reports in the location, it takes me
> to the home page. On that page I see a bar with "New Folder", "New Data
> Souce", "Upload File" and "Show Details" options. Below that I see "Sales
> Reports" and "SampleReports" folders. Clicking those links it takes us to
> the list of reports.
> How can I add a folder there called "Maintenance" (Where I see "Sales
> Reports" and "SampleReports" folders i.e Home page). Clicking that link it
> should list all Maintenance programs available (For Example, "ReasonCodes").
> That link should take us to the aspx page.
> Any Suggestions?
>
>

ASP-SQL Server Remote Connection error

Its been almost 2 months i start running a test script page to check if i made the remote connection until now its getting worst.

I did follow every bit of the instruction and pre-evaluation in fact the script is working locally with this string:

cn.Open "Driver={SQL Server};" & _
"Server=global-static-ip;" & _
"Address=local ip,1433;" & _
"Network=DBMSSOCN;" & _
"Database=testdb;" & _
"Uid=xx;" & _
"Pwd=xx;"

i also review the ff post for client and server trouble shooting tips:
http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx

surface configuration, sql browser, firewall exemption...

and nothing seems change when i access the uploaded script.

is there anything i am missing?

by the way the script is uploaded by company.

hi,

what kind of exception are you reported with?

regards

|||Please do not double post and stick to your original posted thread.

Jens K. Suessmeyer.

http://www.sqlserver2005.de

AspNetSessionExpiredException - Your results may vary?

I have a custom reporting application that displays Sql Server Reporting Services reports on an ASP.NET page using Microsoft's report viewer control. The SSRS reports are local reports (they have an rdlc extension).

When a report is left inactive for a lengthy period of time it generates anAspNetSessionExpiredException when the user attempts to move to a new page. The thing that is surprising is that the formatted exception display is contained within the report viewer. The report document map remains visible as does the report toolbar. In the right pane where the report normally appears I see a standard, raw, ASP.NET exception display.

I'm surprised that the report viewer is "catching" the exception and displaying it within the report viewer. Standard events in the page that hosts the report viewer (PreInit, Init, PageLoad) are never invoked.

I have graceful error handling defined in a base page class but it does me no good because the exception never reaches the page code-behind. Puzzling.

Do any of you ASP.NET developers know if it is possible to catch theAspNetSessionExpiredExceptionso that I can handle it in my application code rather than having SSRS display a very ugly, very raw exception message.

I've included the exception message below.

Thanks.

BlackCatBone

...

Server Error in '/templatedemo' Application.

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

ASP.NET session has expired

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: Microsoft.Reporting.WebForms.AspNetSessionExpiredException: ASP.NET session has expired

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:

[AspNetSessionExpiredException: ASP.NET session has expired]

Microsoft.Reporting.WebForms.ReportDataOperation..ctor() +683

Microsoft.Reporting.WebForms.HttpHandler.GetHandler() +553

Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +10

System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

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

Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

I am having exactly the same problem. If anyone knows the solution to this it would be fabulous to here from you.

|||

I had the same problem and I found the solution in this posthttp://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=170875&SiteID=1. See Brian Hartman's post regarding sessionState. I used his suggestion of using the out-of-process session state as StateServer mode and it fixed the issue for me. Good luck.

AspNetHostingPermission and subscriptions

Hi,
Since a week the subsriptions are not working anymore.
I'm getting following status error in the subscription page:
Error: Request for the permission of type
System.Web.AspNetHostingPermission, System, Version=1.0.5000.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089 failed
The reportserver is using forms authentication.
The report is working fine.
The subscription in datadriven and gives input for a parameter(the data
query is working fine).
There is a subscription for file export (pdf), email and print. All 3
subscriptions gives the same error.
There is no event about this error.
Thanks for any help
BartHi Bart,
Thank you for your post.
Would you please try to download the following config file and replace your
original file?
http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
01CE0/887787.exe
To replace the .config files with new versions that are available from the
Microsoft Download Center, follow these steps:
Important When you replace your .config files, you return to a default
installation. Any changes that you have made to the configuration files
will be lost.
1. Locate the following two files on the computer that is running Microsoft
Internet Information Services (IIS) and the Reporting Services components:
? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
Services\ReportServer\rssrvpolicy.config
? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
Services\ReportManager\rsmgrpolicy.config
2. Rename the files in step 1 to Rssrvpolicy.old and Rsmgrpolicy.old.
3. Download the .config files from the following link:
http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
01CE0/887787.exe
4. Expand the files from the package to your local drive.
5. Replace your current .config files with the .config files from the
package.
6. Restart the IIS services by using IIS Manager.
Here is the article for your reference.
887787 You may receive error messages from Reporting Services after you
install the ASP.NET ValidatePath Module
http://support.microsoft.com/default.aspx?scid=kb;EN-US;887787
Hope this will be helpful.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Wei,
Thanks for your help.
I've got the same error message.
What else can I try?
Thanks
Bart
"Wei Lu" wrote:
> Hi Bart,
> Thank you for your post.
> Would you please try to download the following config file and replace your
> original file?
> http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
> 01CE0/887787.exe
> To replace the .config files with new versions that are available from the
> Microsoft Download Center, follow these steps:
> Important When you replace your .config files, you return to a default
> installation. Any changes that you have made to the configuration files
> will be lost.
> 1. Locate the following two files on the computer that is running Microsoft
> Internet Information Services (IIS) and the Reporting Services components:
> ? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportServer\rssrvpolicy.config
> ? %ProgramFiles%\Microsoft SQL Server\MSSQL\Reporting
> Services\ReportManager\rsmgrpolicy.config
> 2. Rename the files in step 1 to Rssrvpolicy.old and Rsmgrpolicy.old.
> 3. Download the .config files from the following link:
> http://download.microsoft.com/download/9/8/C/98CEED6D-3489-4504-BBB5-586B630
> 01CE0/887787.exe
> 4. Expand the files from the package to your local drive.
> 5. Replace your current .config files with the .config files from the
> package.
> 6. Restart the IIS services by using IIS Manager.
> Here is the article for your reference.
> 887787 You may receive error messages from Reporting Services after you
> install the ASP.NET ValidatePath Module
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;887787
> Hope this will be helpful.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Hi Bart,
Thank you for the update.
Would you please change the following setting in the web.config file of
Report Manager and the Report Server:
<system.web>
<trust level="RosettaMgr" originUrl="" />
</system.web>
Please change the level attribut of the trust element to "Full" and have a
try again?
If this issue still appeared again, would you please send the report log
file to me? By default, the log file is located at \Microsoft SQL
Server\<SQL Server Instance>\Reporting Services\LogFiles. Also, please send
these two web.config files. You may zip the folder with logfiles and
include these two web.config files and send to me directly. I understand
the information may be sensitive to you, my direct email address is
weilu@.ONLINE.microsoft.com (Please remove ONLINE. before you send the
email. ), you may
send the file to me directly and I will keep secure.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Bart,
Thank you for coming back. I researched your log file and searched in out
internal database. I found a similar issue and here is the solution:
1. Save the following string in an XML file.
<IPermission class="System.Web.AspNetHostingPermission, System,
Version=1.0.5000.0, Culture=neutral, publicKeyToken=b77a5c561934e089"
version="1" Level="Unrestricted" />
2. Then open Microsoft .NET Framework 1.1 Configuration Console and expand
till:
Runtime Security Policy >> Machine >> Code Groups >> All_Code.>>
My_Computer_Zone.
3. Right click the My_Computer_Zone and select New..
4. Give a proper name for new code group and click Next.
5. Choose All Code from the only dropdown list and click next.
6. Select Create a new permission set option and click next.
7. Give a proper name to new permission set. And click next.
8. In the middle of the window, down bottom, click Import.. Button.
Locate the xml file in which we have saved the permission set string.
9. Click next and then finish.
10. Repeat the same with LocalIntranet_Zone and Internet_Zone if this
doesn't resolves the problem.
11. Restart the IIS by using IISRESET from command prompt or through the
GUI.
Here are a few good MSDN articles for your records:
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/htm
l/secmod82.asp>
<http://msdn.microsoft.com/msdnmag/issues/01/02/CAS/default.aspx>
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/h
tml/THCMCh09.asp>
Hope this information will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================(This posting is provided "AS IS", with no warranties, and confers no
rights.)|||Hi Lu,
I've created the permissionset in the 3 zones.
The result is the same.
One change is that the error is not logged in the logfile:
<Header>
<Product>Microsoft SQL Server Reporting Services Version
8.00.1042.00</Product>
<Locale>en-US</Locale>
<TimeZone>Romance Daylight Time</TimeZone>
<Path>C:\Program Files\Microsoft SQL Server\MSSQL\Reporting
Services\LogFiles\ReportServer__08_08_2006_12_10_17.log</Path>
<SystemName>SERVER</SystemName>
<OSName>Microsoft Windows NT 5.2.3790.0</OSName>
<OSVersion>5.2.3790.0</OSVersion>
</Header>
w3wp!webserver!1930!8/08/2006-12:10:17:: i INFO: Reporting Web Server started
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing ConnectionType
to '1' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
IsSchedulingService to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
IsNotificationService to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing IsEventService
to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing PollingInterval
to '10' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing MemoryLimit to
'60' percent as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing RecycleTime to
'720' minute(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
MaximumMemoryLimit to '80' percent as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
MaxAppDomainUnloadTime to '30' minute(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing MaxQueueThreads
to '0' thread(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
MaxActiveReqForOneUser to '20' requests(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing MaxScheduleWait
to '5' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
DatabaseQueryTimeout to '120' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing InstanceName to
'MSSQLSERVER' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
ProcessRecycleOptions to '0' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
RunningRequestsScavengerCycle to '60' second(s) as specified in Configuration
file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
RunningRequestsDbCycle to '60' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
RunningRequestsAge to '30' second(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
CleanupCycleMinutes to '10' minute(s) as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
SecureConnectionLevel to '0' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing DisplayErrorLink
to 'True' as specified in Configuration file.
w3wp!library!1930!8/08/2006-12:10:17:: i INFO: Initializing
WebServiceUseFileShareStorage to default value of 'False' because it was not
specified in Configuration file.
w3wp!resourceutilities!1930!8/08/2006-12:10:17:: i INFO: Running on 1
physical processors, 1 logical processors
w3wp!resourceutilities!1930!8/08/2006-12:10:17:: i INFO: Reporting Services
starting SKU: Developer
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Database Cleanup (Web
Service) timer enabled: Next Event: 600 seconds. Cycle: 600 seconds
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Running Requests
Scavenger timer enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Running Requests DB timer
enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!runningjobs!1930!8/08/2006-12:10:17:: i INFO: Memory stats update timer
enabled: Next Event: 60 seconds. Cycle: 60 seconds
w3wp!library!1930!08/08/2006-12:10:28:: i INFO: Call to GetSystemPermissions
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Initializing crypto as user:
NT AUTHORITY\NETWORK SERVICE
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Exporting public key
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Performing sku validation
w3wp!crypto!1930!08/08/2006-12:10:28:: i INFO: Importing existing encryption
key
w3wp!library!1004!08/08/2006-12:10:31:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:10:41:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:10:44:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:10:45:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1004!08/08/2006-12:10:45:: i INFO: Initializing
EnableIntegratedSecurity to 'True' as specified in Server system properties.
w3wp!library!1d40!08/08/2006-12:10:46:: i INFO: Call to GetSystemPermissions
w3wp!library!1d40!08/08/2006-12:10:46:: i INFO: Initializing
ResponseBufferSizeKb to default value of '64' KB because it was not specified
in Server system properties.
w3wp!library!1d40!08/08/2006-12:10:46:: i INFO: Initializing
UseSessionCookies to 'True' as specified in Server system properties.
w3wp!library!1930!08/08/2006-12:10:47:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1930!08/08/2006-12:10:47:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:12:24:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1930!08/08/2006-12:12:24:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:12:27:: i INFO: Initializing SessionTimeout
to '600' second(s) as specified in Server system properties.
w3wp!library!1004!08/08/2006-12:12:27:: i INFO: Initializing
EnableClientPrinting to default value of 'True' because it was not specified
in Server system properties.
w3wp!library!1004!08/08/2006-12:12:28:: i INFO: Call to RenderFirst(
'/Opdrachten/Betaalherinneringen' )
w3wp!library!1004!8/8/2006-12:12:33:: i INFO: Initializing
SqlStreamingBufferSize to default value of '64640' Bytes because it was not
specified in Server system properties.
w3wp!library!1004!8/8/2006-12:12:33:: i INFO: Initializing
SnapshotCompression to 'SQL' as specified in Server system properties.
w3wp!library!1004!08/08/2006-12:12:33:: Using folder C:\Program
Files\Microsoft SQL Server\MSSQL\Reporting Services\RSTempFiles for temporary
files.
w3wp!library!1004!08/08/2006-12:12:34:: i INFO: Initializing
EnableExecutionLogging to 'True' as specified in Server system properties.
w3wp!webserver!1004!08/08/2006-12:12:34:: i INFO: Processed report.
Report='/Opdrachten/Betaalherinneringen', Stream=''
w3wp!library!1930!08/08/2006-12:12:56:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:12:56:: i INFO: Call to ListRoles
w3wp!library!1004!08/08/2006-12:13:02:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:13:04:: i INFO: Call to GetSystemPermissions
w3wp!library!1d40!08/08/2006-12:13:10:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:13:10:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:13:49:: i INFO: Call to GetSystemPermissions
w3wp!library!1d40!08/08/2006-12:14:00:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:04:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:09:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:12:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:14:19:: i INFO: Call to GetSystemPermissions
w3wp!library!1930!08/08/2006-12:14:21:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:14:22:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1004!08/08/2006-12:14:22:: i INFO: Call to GetSystemPermissions
w3wp!library!1004!08/08/2006-12:14:23:: i INFO: Call to
GetPermissions:/Opdrachten/Betaalherinneringen
w3wp!library!1004!08/08/2006-12:14:24:: i INFO: Call to GetSystemPermissions
Any idea?
Thanks
Bart
"Wei Lu [MSFT]" wrote:
> Hi Bart,
> Thank you for coming back. I researched your log file and searched in out
> internal database. I found a similar issue and here is the solution:
> 1. Save the following string in an XML file.
> <IPermission class="System.Web.AspNetHostingPermission, System,
> Version=1.0.5000.0, Culture=neutral, publicKeyToken=b77a5c561934e089"
> version="1" Level="Unrestricted" />
>
> 2. Then open Microsoft .NET Framework 1.1 Configuration Console and expand
> till:
> Runtime Security Policy >> Machine >> Code Groups >> All_Code.>>
> My_Computer_Zone.
> 3. Right click the My_Computer_Zone and select New..
> 4. Give a proper name for new code group and click Next.
> 5. Choose All Code from the only dropdown list and click next.
> 6. Select Create a new permission set option and click next.
> 7. Give a proper name to new permission set. And click next.
> 8. In the middle of the window, down bottom, click Import.. Button.
> Locate the xml file in which we have saved the permission set string.
> 9. Click next and then finish.
> 10. Repeat the same with LocalIntranet_Zone and Internet_Zone if this
> doesn't resolves the problem.
> 11. Restart the IIS by using IISRESET from command prompt or through the
> GUI.
> Here are a few good MSDN articles for your records:
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/htm
> l/secmod82.asp>
> <http://msdn.microsoft.com/msdnmag/issues/01/02/CAS/default.aspx>
> <http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/h
> tml/THCMCh09.asp>
> Hope this information will be helpful!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
> ==================================================> Get notification to my posts through email? Please refer to
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications.
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ==================================================> (This posting is provided "AS IS", with no warranties, and confers no
> rights.)
>
>|||Hi Bart,
Please try to re-create the subscription first to check whether this issue
appeared or not.
If you try to access the Report manager, does any issue appear?
Please let me know the result. Thank you!
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi Lu,
Re-created the subscription, same issue.
Via the report manager, no problem.
Bart
"Wei Lu [MSFT]" wrote:
> Hi Bart,
> Please try to re-create the subscription first to check whether this issue
> appeared or not.
> If you try to access the Report manager, does any issue appear?
> Please let me know the result. Thank you!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
>|||Hi Bart,
From your description, we need to use the Filemon tool to monitor the file
access and try to figure out are there any permission issue.
Please try to download the Filemon from the following web site. Run it and
try to create a subsciption and then stop and save the result.
http://www.sysinternals.com/Utilities/Filemon.html
Please send the result to me. my direct email address is
weilu@.ONLINE.microsoft.com ( Please remove ONLINE when you send the email
), you may send the file to me directly and I will keep it secure.
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi Wei,
Have you received my email last week?
Send on 22/8
Thanks
Bart
"Wei Lu [MSFT]" wrote:
> Hi Bart,
> From your description, we need to use the Filemon tool to monitor the file
> access and try to figure out are there any permission issue.
> Please try to download the Filemon from the following web site. Run it and
> try to create a subsciption and then stop and save the result.
> http://www.sysinternals.com/Utilities/Filemon.html
> Please send the result to me. my direct email address is
> weilu@.ONLINE.microsoft.com ( Please remove ONLINE when you send the email
> ), you may send the file to me directly and I will keep it secure.
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
>|||Hello Bart,
Unfortunately, I do not get the email.
Would you please send it again? Thanks!
Sincerely,
Wei Lu
Microsoft Online Community Support|||Hi Wei,
It seems to be that you are not getting my emails:
About your last email with the caspol trick, it didn't bring any solution.
Have you any idea?
Thanks
Bart
"Wei Lu [MSFT]" wrote:
> Hello Bart,
> Unfortunately, I do not get the email.
> Would you please send it again? Thanks!
> Sincerely,
> Wei Lu
> Microsoft Online Community Support
>|||Hello Bart,
Unforunately, I do not get the email from you.
You mean that if you turn off the CAS, you still could not send the
subscriptions.
Would you please let me know if you remove the Form authenticatioin, does
this issue appear?
Also, if you remove the content of the element
<UnattendedExecutionAccount></UnattendedExecutionAccount> in the
RSReportServer.config file, does this issue still appear?
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.|||Hello bart,
How is everything going? Please feel free to let me know if you need any
assistance.
Sincerely,
Wei Lu
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, February 19, 2012

ASPNET account can't connect to MSSQLSERVER

When I try to access my PasswordRecovery.aspx page I get an error. I've also added the Event Warning and the Failure Audit. I've tried deleting the ASPNET user account and recreating it using aspnet_regiis.exe. I still get the same error message. Should I add the ASPNET account to the Administrators group? Currently it is with the Users group.

Login failed for user 'PC325862970629\ASPNET'.

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.Data.SqlClient.SqlException: Login failed for user 'PC325862970629\ASPNET'.

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:

[SqlException (0x80131904): Login failed for user 'PC325862970629\ASPNET'.]

System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734979

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188

System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838

System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28

System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424

System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66

System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496

System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82

System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105

System.Data.SqlClient.SqlConnection.Open() +111

System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate) +84

System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation) +197

System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate) +1121

System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat) +105

System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved) +42

System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password) +83

System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e) +160

System.Web.UI.WebControls.Login.AttemptLogin() +105

System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e) +99

System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35

System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115

System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163

System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7

System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11

System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33

System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

When I check my Events log I see this warning:

-

Event Type: Warning
Event Source: ASP.NET 2.0.50727.0
Event Category: Web Event
Event ID: 1309
Date: 8/24/2006
Time: 5:13:54 PM
User: N/A
Computer: PC325862970629
Description:
Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 8/24/2006 5:13:54 PM
Event time (UTC): 8/25/2006 12:13:54 AM
Event ID: b3b1e4fbbd634d04a5acd3de09a4df88
Event sequence: 22
Event occurrence: 7
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/Root/Aidms-1-128009374139687500
Trust level: Full
Application Virtual Path: /Aidms
Application Path: C:\aidms\
Machine name: PC325862970629
Process information:
Process ID: 5128
Process name: aspnet_wp.exe
Account name: PC325862970629\ASPNET
Exception information:
Exception type: SqlException
Exception message: Login failed for user 'PC325862970629\ASPNET'.
Request information:
Request URL: http://localhost/Aidms/Default.aspx
Request path: /Aidms/Default.aspx
User host address: 127.0.0.1
User:
Is authenticated: False
Authentication Type:
Thread account name: PC325862970629\ASPNET
Thread information:
Thread ID: 1
Thread account name: PC325862970629\ASPNET
Is impersonating: False
Stack trace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at System.Web.DataAccess.SqlConnectionHolder.Open(HttpContext context, Boolean revertImpersonate)
at System.Web.DataAccess.SqlConnectionHelper.GetConnection(String connectionString, Boolean revertImpersonation)
at System.Web.Security.SqlMembershipProvider.GetPasswordWithFormat(String username, Boolean updateLastLoginActivityDate, Int32& status, String& password, Int32& passwordFormat, String& passwordSalt, Int32& failedPasswordAttemptCount, Int32& failedPasswordAnswerAttemptCount, Boolean& isApproved, DateTime& lastLoginDate, DateTime& lastActivityDate)
at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved, String& salt, Int32& passwordFormat)
at System.Web.Security.SqlMembershipProvider.CheckPassword(String username, String password, Boolean updateLastLoginActivityDate, Boolean failIfNotApproved)
at System.Web.Security.SqlMembershipProvider.ValidateUser(String username, String password)
at System.Web.UI.WebControls.Login.OnAuthenticate(AuthenticateEventArgs e)
at System.Web.UI.WebControls.Login.AttemptLogin()
at System.Web.UI.WebControls.Login.OnBubbleEvent(Object source, EventArgs e)
at System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args)
at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e)
at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument)
at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Custom event details:

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

And then I see this Failutre Audit

--

Event Type: Failure Audit
Event Source: MSSQLSERVER
Event Category: (4)
Event ID: 18456
Date: 8/24/2006
Time: 5:13:54 PM
User: PC325862970629\ASPNET
Computer: PC325862970629
Description:
Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Data:
0000: 18 48 00 00 0e 00 00 00 .H......
0008: 0f 00 00 00 50 00 43 00 ....P.C.
0010: 33 00 32 00 35 00 38 00 3.2.5.8.
0018: 36 00 32 00 39 00 37 00 6.2.9.7.
0020: 30 00 36 00 32 00 39 00 0.6.2.9.
0028: 00 00 07 00 00 00 6d 00 ......m.
0030: 61 00 73 00 74 00 65 00 a.s.t.e.
0038: 72 00 00 00 r...

The security folks may be able to answer this more quickly.

Thanks,
Sam

|||Is your ASP.NET app and SQL Server both in the same machine?|||Yes both ASP and SQLSERVRER are running on the same machine.|||

Can you have a look at the errorlog file of SQL Server and copy the error logged there? It should be under the LOG directory of your installation. A new log is created after each restart, so you may have to look at several files to find the one that contains this error.

Also, have you allowed the ASPNET account to access your SQL Server installation? Did this connection ever work or is it the first time you tried it?

Thanks
Laurentiu

|||I didn't have to allow the ASNET account access to my SQL Server installation before because it was working fine. Can you please give me the instructions to allow access to my SQL server?

Below is the log file from SQL server that I believe ties in to the above problem.
-
2006-08-24 16:55:27.06 Server Microsoft SQL Server 2005 - 9.00.1399.06 (Intel X86)
Oct 14 2005 00:33:37
Copyright (c) 1988-2005 Microsoft Corporation
Standard Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

2006-08-24 16:55:27.06 Server (c) 2005 Microsoft Corporation.
2006-08-24 16:55:27.06 Server All rights reserved.
2006-08-24 16:55:27.06 Server Server process ID is 2636.
2006-08-24 16:55:27.06 Server Logging SQL Server messages in file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG'.
2006-08-24 16:55:27.06 Server This instance of SQL Server last reported using a process ID of 476 at 8/24/2006 4:53:33 PM (local) 8/24/2006 11:53:33 PM (UTC). This is an informational message only; no user action is required.
2006-08-24 16:55:28.46 Server Registry startup parameters:
2006-08-24 16:55:28.54 Server -d C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf
2006-08-24 16:55:28.54 Server -e C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG
2006-08-24 16:55:28.54 Server -l C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf
2006-08-24 16:55:29.46 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2006-08-24 16:55:29.46 Server Detected 1 CPUs. This is an informational message; no user action is required.
2006-08-24 16:55:33.07 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.
2006-08-24 16:55:35.20 Server Attempting to initialize Microsoft Distributed Transaction Coordinator (MS DTC). This is an informational message only. No user action is required.
2006-08-24 16:55:37.06 Server The Microsoft Distributed Transaction Coordinator (MS DTC) service could not be contacted. If you would like distributed transaction functionality, please start this service.
2006-08-24 16:55:37.15 Server Database Mirroring Transport is disabled in the endpoint configuration.
2006-08-24 16:55:37.37 spid5s Starting up database 'master'.
2006-08-24 16:55:37.82 spid5s Recovery is writing a checkpoint in database 'master' (1). This is an informational message only. No user action is required.
2006-08-24 16:55:38.37 spid5s SQL Trace ID 1 was started by login "sa".
2006-08-24 16:55:38.46 spid5s Starting up database 'mssqlsystemresource'.
2006-08-24 16:55:38.92 spid9s Starting up database 'model'.
2006-08-24 16:55:38.93 spid5s Server name is 'PC325862970629'. This is an informational message only. No user action is required.
2006-08-24 16:55:39.26 Server A self-generated certificate was successfully loaded for encryption.
2006-08-24 16:55:39.28 Server Server is listening on [ 'any' <ipv4> 1433].
2006-08-24 16:55:39.28 Server Server local connection provider is ready to accept connection on [ \\.\pipe\SQLLocal\MSSQLSERVER ].
2006-08-24 16:55:39.28 Server Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ].
2006-08-24 16:55:39.28 Server Server is listening on [ 127.0.0.1 <ipv4> 1434].
2006-08-24 16:55:39.28 Server Dedicated admin connection support was established for listening locally on port 1434.
2006-08-24 16:55:39.32 Server The SQL Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b. Failure to register an SPN may cause integrated authentication to fall back to NTLM instead of Kerberos. This is an informational message. Further action is only required if Kerberos authentication is required by authentication policies.
2006-08-24 16:55:39.34 Server SQL Server is now ready for client connections. This is an informational message; no user action is required.
2006-08-24 16:55:39.87 spid9s Clearing tempdb database.
2006-08-24 16:55:41.20 spid9s Starting up database 'tempdb'.
2006-08-24 16:55:42.79 spid12s The Service Broker protocol transport is disabled or not configured.
2006-08-24 16:55:42.79 spid12s The Database Mirroring protocol transport is disabled or not configured.
2006-08-24 16:55:42.92 spid12s Service Broker manager has started.
2006-08-24 16:55:45.23 spid14s Starting up database 'msdb'.
2006-08-24 16:55:45.23 spid16s Starting up database 'Aidms'.
2006-08-24 16:55:48.67 spid5s Recovery is complete. This is an informational message only. No user action is required.
2006-08-24 16:57:16.43 Logon Error: 18456, Severity: 14, State: 11.
2006-08-24 16:57:16.43 Logon Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]
2006-08-24 16:57:31.57 Logon Error: 18456, Severity: 14, State: 11.
2006-08-24 16:57:31.57 Logon Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]
2006-08-24 16:58:41.96 Logon Error: 18456, Severity: 14, State: 11.
2006-08-24 16:58:41.96 Logon Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]
2006-08-24 17:06:49.76 Logon Error: 18456, Severity: 14, State: 11.
2006-08-24 17:06:49.76 Logon Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]
2006-08-24 17:09:40.25 Logon Error: 18456, Severity: 14, State: 11.
2006-08-24 17:09:40.25 Logon Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]
2006-08-24 17:13:54.57 Logon Error: 18456, Severity: 14, State: 11.
2006-08-24 17:13:54.57 Logon Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]
2006-08-24 17:23:59.60 Logon Error: 18456, Severity: 14, State: 11.
2006-08-24 17:23:59.60 Logon Login failed for user 'PC325862970629\ASPNET'. [CLIENT: <local machine>]
2006-08-24 17:36:26.00 Server SQL Server is terminating because of a system shutdown. This is an informational message only. No user action is required.
2006-08-24 17:36:28.03 spid12s Service Broker manager has shut down.
2006-08-24 17:36:28.04 spid12s Error: 17054, Severity: 16, State: 1.
2006-08-24 17:36:28.04 spid12s The current event was not reported to the Windows Events log. Operating system error = 31(A device attached to the system is not functioning.). You may need to clear the Windows Events log if it is full.
2006-08-24 17:36:31.17 spid5s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.
2006-08-24 17:36:33.01 Server The SQL Network Interface library could not deregister the Service Principal Name (SPN) for the SQL Server service. Error: 0x54b. Administrator should deregister this SPN manually to avoid client authentication errors.|||

You can execute:

CREATE LOGIN [PC325862970629\ASPNET] FROM WINDOWS

to create a SQL login for the ASPNET account. Let us know if this doesn't solve the login failure. I am not sure about the additional permissions that you need to grant to the ASPNET account for your application to work. A better forum for such further inquiries would be the ASP.Net forum at: http://forums.asp.net/default.aspx.

Thanks
Laurentiu

|||Aspnet_regiis.exe creates the ASPNET account for windows. I've deleted and recreated the account twice but I still get the same above error. Any help from a Microsoft representative would help in addition to the suggestions that have been given to far.|||

The command I mentioned in my previous post needs to be executed within SQL Server. You need to connect to SQL Server using a tool like sqlcmd or Management Studio, and issue that command to allow the ASPNET account to connect to SQL Server.

Thanks
Laurentiu

|||Thank you very much. Your previous post was te solution to my problem.

Thursday, February 16, 2012

asp.net Stored Procedures vs not

Hey,

I'm developing an asp.net page that will be looking at having approx 500 000 members.

I have be warned by my webhost admin not to use stored procedures. They say that they are much less efficient with large databases. Harder to manage, and will lock me down.

This struck me as odd, as everything I have read and done so far points to SP's being the way to go.

People that have experience with large databases, what advice / comments can you give me? Should I use stored procedures, or should I put all my sql in the asp.net pages.

My situation, asp.net, ms sql. I will be storing the users in user groups, each group will have its own table containing member information, each group will have between 20 and 500 members. Each group will also have 2-3 tables associated with it. (not sure if this information is relevant, but if it is, there ya go).

ThanksWhat?? The only way I could see it being harder to manage would be if they didn't know what the heck they were doing with stored procedures...

I've been developing web sites with database interaction for the last 6 years or so and IMO stored procs are a must.

Stored procedures are less efficient with large databases?? Um,... no,... especially not if you are comparing them to straight sql statements being executed... yes, you can get problems with execution paths not using the right indexes but if you know what you are doing it's not a big issue...|||Phew, thought I was going mad. Because I couldn't understand why not to use SP's, lol.

One question though. (here we see the n00b emerge) lol

-Quote
yes, you can get problems with execution paths not using the right indexes but if you know what you are doing it's not a big issue...

I don't follow what people mean when they say indexing etc. I've sort of learn sql by playing and reading forums. I've never actually found a good book I thought worth buying (or resource really) other than these forums, lol.

How can I avoid bad indexing? What is indexing? This may be big and hard to answer, so if you'd rather throw me at a resource (online or book), do it, lol. A little reading never hurt anybody. It's a lot of 'reading the wrong stuff' that hurts, lol.

Thanks again rokslide,
-Ashleigh|||In short an index is exactly that....

Think about a book,.. it has an index that tells you where to find what you are looking for...

Tables are like books and they can have indexes,...

The indexes help "organise" the data and mean that when you are in there looking for things you can find it alot faster... Indexes will make the database take up more space but generally the performance increase and the reduced table locking will be well worth it...

It's difficult to say exactly what is bad indexing. I guess it's indexes that are too large for the return they give...

The problem I was referring to is... stored procedures are compiled, when they compile the build and execution plan and decide what indexes they will use. Sometimes they will not pick the best index and sometimes the best index will change depending on the data in the table. When this helps you need to force the stored procedure to build a new execution plan. This is probably not technically right (eg I have the phrases wrong) but the gist of it is correct from my understanding...

Deciding what indexes you want to build really depends on what you want to search the table for and how the data in the table relates to other things... drop me a PM (do we have PM's here?) and I can help you if you want to provide specific details.

ASP.Net SQL Server Reports

Hi All

I want to utilize (embed) sql reporting service report in my ASP.Net web page. i.e., I want to handle all connections to sql server etc., from the ASP.Net page itself.. I have seen lot of examples which deal with SQL reporting services directly using viewers and hosting the report on IIS etc.,

Please give some idea on how to do the task

Any kind of help would be gr8ly helpful

SQLRS is available as a web service. You can always call the webservice and pass the parameters and retrieve the report. There's plenty of articles availableif you google.

Monday, February 13, 2012

ASP.NET ReportViewer / Non-String parameters

I am displaying a local report in a ReportViewer control on an asp.net web page. My report contains non-string parameters. How can i set a non-string parameter value on a local report?You will need to call .ToString() on your value to set it on ReportParameter.|||That would result in a string being passed to the report. I want to pass a float or a datetime to the report.

The only way i've been able to get this to work is to create a typed dataset with the "parameters" i want sent and then use aggregation functions (first,sum, etc...) to get to the data into the report. That is a big workaround in order to get a few simple floats and times into my report. Has anyone been able to get this done using another method?
|||If the data type of the parameter is set to integer/float, you can do these operations. And you can always convert between types in a report expression.

ASP.Net ReportingServices & CPU Usage

I have a report (stored procedure) that I have set up in SQL 2005
Reporting Services. In a web app, I put a Reportviewer control on the
page, and call the report. After a lot of trial & error, it appears to
work.
Sort of.
What happens is when I open it on that tab (I am using AJAX Tab panels,
which had been working fine without this behavior prior to finally
getting the reportviewer working), and the report displays, the "e" on
Internet explorer at the top of the tab now flickers, like the page is
reloading. It also runs the CPU up to 100% on the computer and although
I can go from tab to tab in it (I am using AJAX tab panels in the page),
it will take like up to a minute to go to the next tab. I'm not doing
anything really data-intensive on those tabs, and they had been
functioning fine prior to putting in the report viewer (i.e. they
weren't flickering & clocking the CPU).
I eventually have to kill the page to do anything, because it has the
system up to 100%.
Any idea why reportviewer might make this act this way?
Thanks for the help,How much data are you churning in RS? The way to tell is look at how much
data is actaully returned from the sproc.
As much as possible, try to filter down your data and do calcs in the sproc,
not in RS. If you return large data sets to RS, you will churn the machine.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
"Blasting Cap" <goober@.christian.net> wrote in message
news:%23GxNIeu0HHA.5884@.TK2MSFTNGP02.phx.gbl...
>I have a report (stored procedure) that I have set up in SQL 2005 Reporting
>Services. In a web app, I put a Reportviewer control on the page, and call
>the report. After a lot of trial & error, it appears to work.
> Sort of.
> What happens is when I open it on that tab (I am using AJAX Tab panels,
> which had been working fine without this behavior prior to finally getting
> the reportviewer working), and the report displays, the "e" on Internet
> explorer at the top of the tab now flickers, like the page is reloading.
> It also runs the CPU up to 100% on the computer and although I can go from
> tab to tab in it (I am using AJAX tab panels in the page), it will take
> like up to a minute to go to the next tab. I'm not doing anything really
> data-intensive on those tabs, and they had been functioning fine prior to
> putting in the report viewer (i.e. they weren't flickering & clocking the
> CPU).
> I eventually have to kill the page to do anything, because it has the
> system up to 100%.
> Any idea why reportviewer might make this act this way?
> Thanks for the help,
>|||That's just it - the data isn't that much.
I'm calling a stored procedure with 5 parameters, and it returns 1588
rows in Query Analyzer, and runs in 5 seconds there. The only
difference in QA and the Reportviewer is that I am subtotaling & grand
totaling 3 columns.
If I try to run this from within the ReportViewer, when launching that
web page, it will run the CPU up to 100% until I kill it. Pages are
extremely sluggish, and it'll take a minute or two to just go between
tabs on those 3 pages. I'm doing a Gridview on one tab, that returns
about 50 records, and a dropdown box on the second tab that returns
about 25 records, and then this one that I'm doing in the Reportviewer.
If I take out the reportviewer, the other two pages work as they should,
in next to no time at all.
Once I add back the reportviewer, the "e" on the Internet Explorer tab
flickers and I can watch the CPU usage on the computer go to 100% and
stay there until I kill the procedure. I can close it out using the X
on internet explorer, but it takes several minutes for the web browser
to detect that I've killed the window.
This is behavior beyond strange.
BC
Cowboy (Gregory A. Beamer) wrote:
> How much data are you churning in RS? The way to tell is look at how much
> data is actaully returned from the sproc.
> As much as possible, try to filter down your data and do calcs in the sproc,
> not in RS. If you return large data sets to RS, you will churn the machine.
>|||Try returning the aggregates from the stored procedure and see how that
changes things. It could be that your total calculations are causing issue.
I will have to mull over other possibilities.
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com
Co-author: Microsoft Expression Web Bible (upcoming)
************************************************
Think outside the box!
************************************************
"Blasting Cap" <goober@.christian.net> wrote in message
news:ecQXoO30HHA.4344@.TK2MSFTNGP03.phx.gbl...
> That's just it - the data isn't that much.
> I'm calling a stored procedure with 5 parameters, and it returns 1588 rows
> in Query Analyzer, and runs in 5 seconds there. The only difference in QA
> and the Reportviewer is that I am subtotaling & grand totaling 3 columns.
> If I try to run this from within the ReportViewer, when launching that web
> page, it will run the CPU up to 100% until I kill it. Pages are extremely
> sluggish, and it'll take a minute or two to just go between tabs on those
> 3 pages. I'm doing a Gridview on one tab, that returns about 50 records,
> and a dropdown box on the second tab that returns about 25 records, and
> then this one that I'm doing in the Reportviewer.
> If I take out the reportviewer, the other two pages work as they should,
> in next to no time at all.
> Once I add back the reportviewer, the "e" on the Internet Explorer tab
> flickers and I can watch the CPU usage on the computer go to 100% and stay
> there until I kill the procedure. I can close it out using the X on
> internet explorer, but it takes several minutes for the web browser to
> detect that I've killed the window.
> This is behavior beyond strange.
>
> BC
>
> Cowboy (Gregory A. Beamer) wrote:
>> How much data are you churning in RS? The way to tell is look at how much
>> data is actaully returned from the sproc.
>> As much as possible, try to filter down your data and do calcs in the
>> sproc, not in RS. If you return large data sets to RS, you will churn the
>> machine.|||What happens when you run the report from the web interface using Report
Manager. This will tell you if it is a report issue or an integration issue
with ReportViewer. My guess is that you are telling reportviewer over and
over again to get the report.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:ecQXoO30HHA.4344@.TK2MSFTNGP03.phx.gbl...
> That's just it - the data isn't that much.
> I'm calling a stored procedure with 5 parameters, and it returns 1588 rows
> in Query Analyzer, and runs in 5 seconds there. The only difference in QA
> and the Reportviewer is that I am subtotaling & grand totaling 3 columns.
> If I try to run this from within the ReportViewer, when launching that web
> page, it will run the CPU up to 100% until I kill it. Pages are extremely
> sluggish, and it'll take a minute or two to just go between tabs on those
> 3 pages. I'm doing a Gridview on one tab, that returns about 50 records,
> and a dropdown box on the second tab that returns about 25 records, and
> then this one that I'm doing in the Reportviewer.
> If I take out the reportviewer, the other two pages work as they should,
> in next to no time at all.
> Once I add back the reportviewer, the "e" on the Internet Explorer tab
> flickers and I can watch the CPU usage on the computer go to 100% and stay
> there until I kill the procedure. I can close it out using the X on
> internet explorer, but it takes several minutes for the web browser to
> detect that I've killed the window.
> This is behavior beyond strange.
>
> BC
>
> Cowboy (Gregory A. Beamer) wrote:
>> How much data are you churning in RS? The way to tell is look at how much
>> data is actaully returned from the sproc.
>> As much as possible, try to filter down your data and do calcs in the
>> sproc, not in RS. If you return large data sets to RS, you will churn the
>> machine.|||Just for giggles, I did another report, basically taking a product
listing, that would return about 100 records, that had some numeric
fields on it, but I didn't do any summing or totalling.
This report performs the same way when I call it from the reportviewer.
If I go to the website, http://mycomputer/reports$sql2005, and run it,
it takes about 5 seconds to display & you don't get the "flickering" of
the "e" on Internet Explorer like you do when I try to run the same
report from within the report viewer.
How am I telling the reportviewer over & over again to get the report?
The fact that I have no totaling in the report tells me that it's not
the returning of the data that is the problem.
The code that calls the report:
<cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
<ContentTemplate>
<rsweb:reportviewer id="ReportViewer1"
runat="server" font-names="Verdana" font-size="8pt"
height="90%" width="90%"
ProcessingMode="Remote">
<ServerReport ReportServerUrl="http://mycomputer/ReportServer$SQL2005/"
ReportPath="/BA10listing"></ServerReport>
</rsweb:reportviewer>
</ContentTemplate>
</cc1:TabPanel>
BC
Bruce L-C [MVP] wrote:
> What happens when you run the report from the web interface using Report
> Manager. This will tell you if it is a report issue or an integration issue
> with ReportViewer. My guess is that you are telling reportviewer over and
> over again to get the report.
>|||I have only used the winform version of the reportviewer control (I assume
you are using the reportviewer control that ships with VS 2005). Somewhere
you have to be responding to an event where you tell the control what report
to render. If you do this over and over again you could be causing it to
thrash.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:OD6qfF60HHA.5380@.TK2MSFTNGP04.phx.gbl...
> Just for giggles, I did another report, basically taking a product
> listing, that would return about 100 records, that had some numeric fields
> on it, but I didn't do any summing or totalling.
>
> This report performs the same way when I call it from the reportviewer.
> If I go to the website, http://mycomputer/reports$sql2005, and run it, it
> takes about 5 seconds to display & you don't get the "flickering" of the
> "e" on Internet Explorer like you do when I try to run the same report
> from within the report viewer.
> How am I telling the reportviewer over & over again to get the report?
> The fact that I have no totaling in the report tells me that it's not the
> returning of the data that is the problem.
> The code that calls the report:
> <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
> <ContentTemplate>
> <rsweb:reportviewer id="ReportViewer1"
> runat="server" font-names="Verdana" font-size="8pt"
> height="90%" width="90%"
> ProcessingMode="Remote">
> <ServerReport ReportServerUrl="http://mycomputer/ReportServer$SQL2005/"
> ReportPath="/BA10listing"></ServerReport>
> </rsweb:reportviewer>
> </ContentTemplate>
> </cc1:TabPanel>
> BC
>
>
> Bruce L-C [MVP] wrote:
>> What happens when you run the report from the web interface using Report
>> Manager. This will tell you if it is a report issue or an integration
>> issue with ReportViewer. My guess is that you are telling reportviewer
>> over and over again to get the report.|||Try the reportviewer control on a simple web page and see if the same thing
happens. I.e. no tabs, just a single simple web page.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:OD6qfF60HHA.5380@.TK2MSFTNGP04.phx.gbl...
> Just for giggles, I did another report, basically taking a product
> listing, that would return about 100 records, that had some numeric fields
> on it, but I didn't do any summing or totalling.
>
> This report performs the same way when I call it from the reportviewer.
> If I go to the website, http://mycomputer/reports$sql2005, and run it, it
> takes about 5 seconds to display & you don't get the "flickering" of the
> "e" on Internet Explorer like you do when I try to run the same report
> from within the report viewer.
> How am I telling the reportviewer over & over again to get the report?
> The fact that I have no totaling in the report tells me that it's not the
> returning of the data that is the problem.
> The code that calls the report:
> <cc1:TabPanel ID="TabPanel3" runat="server" HeaderText="TabPanel3">
> <ContentTemplate>
> <rsweb:reportviewer id="ReportViewer1"
> runat="server" font-names="Verdana" font-size="8pt"
> height="90%" width="90%"
> ProcessingMode="Remote">
> <ServerReport ReportServerUrl="http://mycomputer/ReportServer$SQL2005/"
> ReportPath="/BA10listing"></ServerReport>
> </rsweb:reportviewer>
> </ContentTemplate>
> </cc1:TabPanel>
> BC
>
>
> Bruce L-C [MVP] wrote:
>> What happens when you run the report from the web interface using Report
>> Manager. This will tell you if it is a report issue or an integration
>> issue with ReportViewer. My guess is that you are telling reportviewer
>> over and over again to get the report.|||I tried it in the following ways:
- I took an AJAX enabled web page, and added the reportviewer to it.
Brought up the report, did the same thing - the "flickering" of the "e"
on Internet explorer, acting like the page is loading.
I figured then that it could be that AJAX itself was causing the problem.
- I went in & created just a regular old ASP.NET page. (HTML follows).
It performed exactly the same way as the others, pegging the CPU at
100% until I killed it.
The report itself was a "nothing" report - returned 100 or so records,
no sums, no totals, no formatting.
HTML of the regular aspx page is:
<%@. Page Language="VB" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div><rsweb:ReportViewer ID="ReportViewer1" runat="server"
Font-Names="Verdana" Font-Size="8pt" Height="400px"
ProcessingMode="Remote" Width="400px">
<ServerReport ReportPath="/BA10listing"
ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
</rsweb:ReportViewer>
</div>
</form>
</body>
</html>
I've looked at the properties of it, too.
Under BEHAVIOR:
Enabled = True
EnableTheming = True
EnableViewState = True
Visible = True
Under MISC:
AsyncRendering = True
ExportContentDisposition = OnlyHTMLInline
under LocalReport
EnableExternal Images = False
EnableHyperlinks = False
Processingmode = Remote
Under SERVERREPORT - everything's in there - the report name, the
reportserverURL, that both work.
Under TOOLBAR:
DocumentMapCollapsed = False
ShowbackButton = False
ShowDocumentMapButton = True
ShowExportControls = True
ShowFindControls = True
ShowPageNavigationControls = True
ShowPrintButton = True
ShowPromptAreaButton = True
Show RefreshButton = True
ShowZoomControl = True
I don't see anything that "obviously" would make it refresh/hang like it
does.
Using VS 2005, Windows XP. It performs the same way whether I connect
to the local box(my computer) with both SQL 2000 & SQL 2005 on it, or to
a remote box with both on it too.
Any help, suggestions appreciated.
Thanks,
BC
Bruce L-C [MVP] wrote:
> Try the reportviewer control on a simple web page and see if the same thing
> happens. I.e. no tabs, just a single simple web page.
>|||Again, note that I have only used this with Winform control not webform
control. A couple of things to try. Try turning async off. Next, don't have
the report hardcoded. Instead, put a button that sets the report name and
other information (just as a test)
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:%233ryDeE1HHA.5360@.TK2MSFTNGP03.phx.gbl...
>I tried it in the following ways:
> - I took an AJAX enabled web page, and added the reportviewer to it.
> Brought up the report, did the same thing - the "flickering" of the "e" on
> Internet explorer, acting like the page is loading.
> I figured then that it could be that AJAX itself was causing the problem.
> - I went in & created just a regular old ASP.NET page. (HTML follows).
> It performed exactly the same way as the others, pegging the CPU at 100%
> until I killed it.
> The report itself was a "nothing" report - returned 100 or so records, no
> sums, no totals, no formatting.
> HTML of the regular aspx page is:
> <%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
> Inherits="_Default" %>
> <%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div><rsweb:ReportViewer ID="ReportViewer1" runat="server"
> Font-Names="Verdana" Font-Size="8pt" Height="400px"
> ProcessingMode="Remote" Width="400px">
> <ServerReport ReportPath="/BA10listing"
> ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
> </rsweb:ReportViewer>
> </div>
> </form>
> </body>
> </html>
>
> I've looked at the properties of it, too.
> Under BEHAVIOR:
> Enabled = True
> EnableTheming = True
> EnableViewState = True
> Visible = True
> Under MISC:
> AsyncRendering = True
> ExportContentDisposition = OnlyHTMLInline
> under LocalReport
> EnableExternal Images = False
> EnableHyperlinks = False
> Processingmode = Remote
> Under SERVERREPORT - everything's in there - the report name, the
> reportserverURL, that both work.
> Under TOOLBAR:
> DocumentMapCollapsed = False
> ShowbackButton = False
> ShowDocumentMapButton = True
> ShowExportControls = True
> ShowFindControls = True
> ShowPageNavigationControls = True
> ShowPrintButton = True
> ShowPromptAreaButton = True
> Show RefreshButton = True
> ShowZoomControl = True
> I don't see anything that "obviously" would make it refresh/hang like it
> does.
> Using VS 2005, Windows XP. It performs the same way whether I connect to
> the local box(my computer) with both SQL 2000 & SQL 2005 on it, or to a
> remote box with both on it too.
> Any help, suggestions appreciated.
> Thanks,
> BC
>
> Bruce L-C [MVP] wrote:
>> Try the reportviewer control on a simple web page and see if the same
>> thing happens. I.e. no tabs, just a single simple web page.|||I tried turning off Async, and it didn't make any difference.
On the page (plain old dot net aspx page), what I've found out is that
it will load and act normally, but as soon as the page has been
rendered, it starts the clocking behavior. When you try to move the
scrollbars on the report, etc. it takes a long time to get them to
respond. And when they do, they immediately go back to maxing out the
CPU.
I tried the suggestion of putting a button that sets the report name,
and it didn't make any difference. Code is below.
What happened was that when I ran the page, with the
reportviewer1.visible = false, only the button rendered and the web page
was fine - it wasn't hanging the CPU. I hit the button, and it performs
exactly as I indicated earlier. It displays the report, and it pegs the
CPU at 100% and stays that way until I kill the page.
Here's the code in the codefile:
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
Me.ReportViewer1.Visible = False
End If
ReportViewer1.ServerReport.ReportPath = ""
End Sub
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Button1.Click
ReportViewer1.Visible = True
ReportViewer1.ServerReport.ReportPath = "/BA10listing"
End Sub
The code in the aspx part of the page:
<%@. Page Language="VB" AutoEventWireup="false"
CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" />
<rsweb:ReportViewer ID="ReportViewer1" runat="server"
Font-Names="Verdana" Font-Size="8pt" Height="400px"
ProcessingMode="Remote" Width="400px" AsyncRendering="False"
ShowDocumentMapButton="False">
<ServerReport ReportPath="/BA10listing"
ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
</rsweb:ReportViewer>
</div>
</form>
</body>
</html>
... so you can see there's a lot going on here. The report returns
~100 records or so, no calculations, no summation, no grand totals.
Basically a "nothing" report, just listing product info data. Both the
IIS and the reportserver are on my computer.
In SQL Reporting Services in the web browser, this report displays fine,
no problems. It's only when I call it from the Reportviewer inside a
web page that it hangs.
Any ideas? Anyone?
BC
Bruce L-C [MVP] wrote:
> Again, note that I have only used this with Winform control not webform
> control. A couple of things to try. Try turning async off. Next, don't have
> the report hardcoded. Instead, put a button that sets the report name and
> other information (just as a test)
>|||I suggest posting this to the web based forums. I know the other MVP hangs
out there and he has used this control a lot. I suggest putting reportviewer
control in the subject.
http://forums.microsoft.com/msdn/showforum.aspx?forumid=82&siteid=1
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Blasting Cap" <goober@.christian.net> wrote in message
news:eewpPgH1HHA.4652@.TK2MSFTNGP05.phx.gbl...
> I tried turning off Async, and it didn't make any difference.
> On the page (plain old dot net aspx page), what I've found out is that it
> will load and act normally, but as soon as the page has been rendered, it
> starts the clocking behavior. When you try to move the scrollbars on the
> report, etc. it takes a long time to get them to respond. And when they
> do, they immediately go back to maxing out the CPU.
> I tried the suggestion of putting a button that sets the report name, and
> it didn't make any difference. Code is below.
> What happened was that when I ran the page, with the reportviewer1.visible
> = false, only the button rendered and the web page was fine - it wasn't
> hanging the CPU. I hit the button, and it performs exactly as I indicated
> earlier. It displays the report, and it pegs the CPU at 100% and stays
> that way until I kill the page.
> Here's the code in the codefile:
> Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> If Not Page.IsPostBack Then
> Me.ReportViewer1.Visible = False
> End If
> ReportViewer1.ServerReport.ReportPath = ""
> End Sub
> Protected Sub Button1_Click(ByVal sender As Object, ByVal e As
> System.EventArgs) Handles Button1.Click
> ReportViewer1.Visible = True
> ReportViewer1.ServerReport.ReportPath = "/BA10listing"
> End Sub
> The code in the aspx part of the page:
> <%@. Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb"
> Inherits="_Default" %>
> <%@. Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0,
> Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
> Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml" >
> <head runat="server">
> <title>Untitled Page</title>
> </head>
> <body>
> <form id="form1" runat="server">
> <div>
> <asp:Button ID="Button1" runat="server" Text="Button" />
> <rsweb:ReportViewer ID="ReportViewer1" runat="server"
> Font-Names="Verdana" Font-Size="8pt" Height="400px"
> ProcessingMode="Remote" Width="400px" AsyncRendering="False"
> ShowDocumentMapButton="False">
> <ServerReport ReportPath="/BA10listing"
> ReportServerUrl="http://mycomputer/ReportServer$SQL2005/" />
> </rsweb:ReportViewer>
>
> </div>
> </form>
> </body>
> </html>
>
> ... so you can see there's a lot going on here. The report returns ~100
> records or so, no calculations, no summation, no grand totals. Basically a
> "nothing" report, just listing product info data. Both the IIS and the
> reportserver are on my computer.
> In SQL Reporting Services in the web browser, this report displays fine,
> no problems. It's only when I call it from the Reportviewer inside a web
> page that it hangs.
> Any ideas? Anyone?
> BC
>
>
> Bruce L-C [MVP] wrote:
>> Again, note that I have only used this with Winform control not webform
>> control. A couple of things to try. Try turning async off. Next, don't
>> have the report hardcoded. Instead, put a button that sets the report
>> name and other information (just as a test)