Showing posts with label steps. Show all posts
Showing posts with label steps. Show all posts

Thursday, March 8, 2012

.NET FW SDK QuickStart SQL-Express Error: Msg 102 ... Incorrect syntax.

Hi,

I have followed the steps from the .NET FW SDK QuickStart Configuration (C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Samples\Setup\html\ConfigDetails.htm), and have got an error message trying to grant the ASP.NET User account access to the databases by the command sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin LEONEW\ASPNET" where LEONEW is my local machine name, and the ASPNET account exists in the Users group.

I am getting the error message: Msg 102, Level 15, State 1, Server LEONEW\SQLEXPRESS, Line 1
Incorrect syntax near '\'.

Please help if you know how to resolve this. Thanks in advance.

Alex.

Did you try putting apostrophes around the login name:

'LEONEW\ASPNET'

|||I have tried with no success sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin N' LEONEW\ASPNET'".|||

Do you get the same error?

What about

sqlcmd -E -S (local)\SQLExpress -Q "sp_grantlogin 'LEONEW\ASPNET'"

If I use it without the apostrophes I get the same error as you:

Msg 102, Level 15, State 1, Server <...>, Line 1
Incorrect syntax near '\'.

If I add the apostrophes the command succeeds.

|||You are absolutely right. Thanks.

Saturday, February 11, 2012

* problem in form authentication*

Hi,
I am working with Fomauthentication in RS.
I fallowed all steps as it is which had given in Msdn.
My problem is
while working with ReportManager Users r regestring properly.But while iam
trying to logon with the same user an error has occured like "http error 401"
like that.
But i can able to entering into ReportServer with the same users accounts.
so can anybody help me to rectify that error.
Thanks!You need to set your report security like so:
if RS is your object for the reportingservice
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
If you want to use a specific user account for RS authentication, you would
use:
rs.Credentials = New System.Net.NetworkCredential("UserName",
"Password", "DOMAIN")
then set the URL to the report service.
rs.Url = "http://localhost/reportserver/reportservice.asmx"
Good luck.
=-Chris
"simmi" <simmi@.discussions.microsoft.com> wrote in message
news:DEDB591E-B0E4-4252-A156-822B68EC9324@.microsoft.com...
> Hi,
> I am working with Fomauthentication in RS.
> I fallowed all steps as it is which had given in Msdn.
> My problem is
> while working with ReportManager Users r regestring properly.But while iam
> trying to logon with the same user an error has occured like "http error
> 401"
> like that.
> But i can able to entering into ReportServer with the same users accounts.
> so can anybody help me to rectify that error.
> Thanks!|||Did you put the UILogin.aspx and Login.aspx pages in the web site? The
ReportServer is likely using the login method behind the scenes, but the
report manager is using forms authentication page redirection for login.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"simmi" <simmi@.discussions.microsoft.com> wrote in message
news:DEDB591E-B0E4-4252-A156-822B68EC9324@.microsoft.com...
> Hi,
> I am working with Fomauthentication in RS.
> I fallowed all steps as it is which had given in Msdn.
> My problem is
> while working with ReportManager Users r regestring properly.But while iam
> trying to logon with the same user an error has occured like "http error
> 401"
> like that.
> But i can able to entering into ReportServer with the same users accounts.
> so can anybody help me to rectify that error.
> Thanks!|||Whoops, I read "401" and thought "404".
Sounds about right.
--
Cheers,
'(' Jeff A. Stucker
\
Business Intelligence
www.criadvantage.com
---
"Jeff A. Stucker" <jeff@.mobilize.net> wrote in message
news:%23XpR654EFHA.936@.TK2MSFTNGP12.phx.gbl...
> Did you put the UILogin.aspx and Login.aspx pages in the web site? The
> ReportServer is likely using the login method behind the scenes, but the
> report manager is using forms authentication page redirection for login.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> news:DEDB591E-B0E4-4252-A156-822B68EC9324@.microsoft.com...
>> Hi,
>> I am working with Fomauthentication in RS.
>> I fallowed all steps as it is which had given in Msdn.
>> My problem is
>> while working with ReportManager Users r regestring properly.But while
>> iam
>> trying to logon with the same user an error has occured like "http error
>> 401"
>> like that.
>> But i can able to entering into ReportServer with the same users
>> accounts.
>> so can anybody help me to rectify that error.
>> Thanks!
>|||Hi thanks for ur help.But i could't get u r point.
in which file i have to set all these?
plz could u help me
Thanks!
"Christopher Conner" wrote:
> You need to set your report security like so:
> if RS is your object for the reportingservice
> rs.Credentials = System.Net.CredentialCache.DefaultCredentials
> If you want to use a specific user account for RS authentication, you would
> use:
> rs.Credentials = New System.Net.NetworkCredential("UserName",
> "Password", "DOMAIN")
> then set the URL to the report service.
> rs.Url = "http://localhost/reportserver/reportservice.asmx"
> Good luck.
> =-Chris
>
> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> news:DEDB591E-B0E4-4252-A156-822B68EC9324@.microsoft.com...
> > Hi,
> > I am working with Fomauthentication in RS.
> > I fallowed all steps as it is which had given in Msdn.
> >
> > My problem is
> >
> > while working with ReportManager Users r regestring properly.But while iam
> > trying to logon with the same user an error has occured like "http error
> > 401"
> > like that.
> >
> > But i can able to entering into ReportServer with the same users accounts.
> >
> > so can anybody help me to rectify that error.
> > Thanks!
>
>|||Hi,
i set all r correctly.
"Jeff A. Stucker" wrote:
> Did you put the UILogin.aspx and Login.aspx pages in the web site? The
> ReportServer is likely using the login method behind the scenes, but the
> report manager is using forms authentication page redirection for login.
> --
> Cheers,
> '(' Jeff A. Stucker
> \
> Business Intelligence
> www.criadvantage.com
> ---
> "simmi" <simmi@.discussions.microsoft.com> wrote in message
> news:DEDB591E-B0E4-4252-A156-822B68EC9324@.microsoft.com...
> > Hi,
> > I am working with Fomauthentication in RS.
> > I fallowed all steps as it is which had given in Msdn.
> >
> > My problem is
> >
> > while working with ReportManager Users r regestring properly.But while iam
> > trying to logon with the same user an error has occured like "http error
> > 401"
> > like that.
> >
> > But i can able to entering into ReportServer with the same users accounts.
> >
> > so can anybody help me to rectify that error.
> > Thanks!
>
>