Showing posts with label displayed. Show all posts
Showing posts with label displayed. Show all posts

Monday, March 12, 2012

login error

when i display the contents of a MS Access database, it displays fine. but when i use SQL/MSDE database, the contents can by displayed well when i run the aspx locally using webmatrix's local server. but when i access the same aspx file online, i get the following error message:

************* ERROR MESSAGE *************
Server Error in '/' Application.
------------------------

Login failed for user 'PC-MARVINE\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 'PC-MARVINE\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.
************* ERROR MESSAGE *************

the following is the code:


<%@. Page Language="VB" %>
<%@. Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI" Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral, PublicKeyToken=6f763c9966660626" %>
<script runat="server"
' Insert page code here
'

</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<wmx:SqlDataSourceControl id="SqlDataSourceControl1" runat="server" SelectCommand="SELECT * FROM [Employees]" ConnectionString="server='(local)'; trusted_connection=true; database='Northwind'" UpdateCommand="" DeleteCommand=""></wmx:SqlDataSourceControl>
<wmx:MxDataGrid id="MxDataGrid2" runat="server" DataSourceControlID="SqlDataSourceControl1" BorderColor="#CCCCCC" AllowSorting="True" DataMember="Employees" AllowPaging="True" BackColor="White" CellPadding="3" DataKeyField="EmployeeID" BorderWidth="1px" BorderStyle="None">
<PagerStyle horizontalalign="Center" forecolor="#000066" backcolor="White" mode="NumericPages"></PagerStyle>
<FooterStyle forecolor="#000066" backcolor="White"></FooterStyle>
<SelectedItemStyle font-bold="True" forecolor="White" backcolor="#669999"></SelectedItemStyle>
<ItemStyle forecolor="#000066"></ItemStyle>
<HeaderStyle font-bold="True" forecolor="White" backcolor="#006699"></HeaderStyle>
</wmx:MxDataGrid>
</p>
<!-- Insert content here -->
</form>
</body>
</html

do i need to insert some code to do this properly? obviously running the aspx file to display the SQL/MSDE database contents locally works perfectly. i have a webserver setup at home. but when another computer tries to access that file online, i get the error message shown above.

regards,
marvineMy instinct say that the user id under which ASP.NET is running (PC-MARVINE\ASPNET) doesn't have access rights to the SQL Server database. There are a couple of solutions to this problem, the correct one depending on the type of environment you're running and the level of security (read that as risk) that you'd like to have. One of the simplest solutions is to give the ASPNET user access to the SQL Server database. Another is to change the user under which ASP.NET is running to someone that has access to the database. A third is to turn impersonation on for the web site, which means that the person accessing the page will need to have access to the database. There are other options, but I'm sure you get the point.

HTH

Login Credentials

Hi,
When I navigate to my reportsserver url from internet, a login dialogbox
is displayed wherein i have to pass userid and pwd. How can i send this
userid and password(windows account) to the report usinng rs:Parameters?
Or Is there any other way to pass these parameters?
TIAWhat type of authentication do you have setup within IIS on your RS server?
If you have a domain you should set Windows Intergrated authentication. This
would then remove the prompt box.
I think you can configure the userid in either the web.config or the
rsapplication.config (or file called something similar :-))
Paul Walsh
"SSRS NEW" wrote:
> Hi,
> When I navigate to my reportsserver url from internet, a login dialogbox
> is displayed wherein i have to pass userid and pwd. How can i send this
> userid and password(windows account) to the report usinng rs:Parameters?
> Or Is there any other way to pass these parameters?
> TIA

Login box displayed when browsing to ReportServer

Hi,
I have RS and SQL Server on the same development box. When I browse to
http://localhost/ I can see my reports on my box. However, when other
users browse to my machine with http://mymachinename/ they get a Windows
Login box pop up. When they type in their Windows Credentials, the box
pops up again. If they click cancel, they get "You are not authorized to
view this page."
How should I configure IIS to get this working? I've never used IIS or
Reporting Services before.
Thanks.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.htmlIt sounds like a permissions issue. Try enabling anonymous access for the
website, and make sure that the virtual directories that IIS is using have
the proper permissions (at least read perms for the IIS account).
"Mark Allison" wrote:
> Hi,
> I have RS and SQL Server on the same development box. When I browse to
> http://localhost/ I can see my reports on my box. However, when other
> users browse to my machine with http://mymachinename/ they get a Windows
> Login box pop up. When they type in their Windows Credentials, the box
> pops up again. If they click cancel, they get "You are not authorized to
> view this page."
> How should I configure IIS to get this working? I've never used IIS or
> Reporting Services before.
> Thanks.
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>|||Thanks Aaron, yes definitely a perms issue. This is how things are set up:
The error the user sees (different now from my earlier post):
http://tinyurl.com/58mty
IIS
===Authentication methods
http://tinyurl.com/46btf
Default web site properties
http://tinyurl.com/6l9ch
Reporting Services
==================RS Data sources
http://tinyurl.com/5wd78
RS Execution
http://tinyurl.com/3lqlq
RS Security
http://tinyurl.com/4p98j
Reporting Services, IIS and the SQL Server where the Reports database is
located are all on the box.
Thanks for looking into this.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Aaron Z wrote:
> It sounds like a permissions issue. Try enabling anonymous access for the
> website, and make sure that the virtual directories that IIS is using have
> the proper permissions (at least read perms for the IIS account).
> "Mark Allison" wrote:
>
>>Hi,
>>I have RS and SQL Server on the same development box. When I browse to
>>http://localhost/ I can see my reports on my box. However, when other
>>users browse to my machine with http://mymachinename/ they get a Windows
>>Login box pop up. When they type in their Windows Credentials, the box
>>pops up again. If they click cancel, they get "You are not authorized to
>>view this page."
>>How should I configure IIS to get this working? I've never used IIS or
>>Reporting Services before.
>>Thanks.
>>--
>>Mark Allison, SQL Server MVP
>>http://www.markallison.co.uk
>>Looking for a SQL Server replication book?
>>http://www.nwsu.com/0974973602m.html|||I've resolved this myself by using a standard SQL Login.
Thanks for your time.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Mark Allison wrote:
> Thanks Aaron, yes definitely a perms issue. This is how things are set up:
> The error the user sees (different now from my earlier post):
> http://tinyurl.com/58mty
> IIS
> ===> Authentication methods
> http://tinyurl.com/46btf
> Default web site properties
> http://tinyurl.com/6l9ch
>
> Reporting Services
> ==================> RS Data sources
> http://tinyurl.com/5wd78
> RS Execution
> http://tinyurl.com/3lqlq
> RS Security
> http://tinyurl.com/4p98j
>
> Reporting Services, IIS and the SQL Server where the Reports database is
> located are all on the box.
> Thanks for looking into this.
>