Showing posts with label security. Show all posts
Showing posts with label security. Show all posts

Monday, March 26, 2012

Error during FormsAuthentication.RedirectFromLoginPage

Greetings,

I created a custom security extenstion that worked great - except every call to

FormsAuthentication.RedirectFromLoginPage would result in a

"The return URL specified for request redirection is invalid." error type message.

I reverted back to windows security with no problem. Then used the Microsoft Forms Security example thinking maybee I had improperly implemented the interface.

When the forms security example provided by microsoft was configured I still get

"The return URL specified for request redirection is invalid." error type message.

Here is the actual query string when loging into the reportserver using the custom security extension:

http://<MACHINE_NAME>/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fPages%2fReportViewer.aspx%3f%252fMathReports%252fClass%2bProgress%2bChart%26ClassID%3d1514%26rs%3aCommand%3dRender&%2fMathReports%2fClass+Progress+Chart&ClassID=1514&rs:Command=Render

I have replaced the ip with <machine_name>. I have been working on this problem for 2 days with no solution. Help would be nice.

Thanks,

Ross B.

I noticed if I manually changed the ReturnURL in the address bar from

http://<MACHINE_NAME>/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fPages%2fReportViewer.aspx%3f%252fMathReports%252fClass%2bProgress%2bChart%26ClassID%3d1514%26rs%3aCommand%3dRender&%2fMathReports%2fClass+Progress+Chart&ClassID=1514&rs:Command=Render

to

http://<MACHINE_NAME>/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fPages%2fReportViewer.aspx%3f%2fMathReports%2fClass+Progress+Chart&ClassID=1514&rs:Command=Render

It almost looks like the redirect is duplicated in the query string - anyone know why this is?

|||

If I change functionality from

FormsAuthentication.RedirectFromLoginPage(TxtUser.Text, false);

To:

aUrl=Request.QueryString["ReturnUrl"];

FormsAuthentication.SetAuthCookie(TxtUser.Text,false);

Response.Redirect(aURL);

This works...however I am still puzzled as to what is causing the recommended way to fail in my setup.

Ross B.

|||

Hi,

I am facing a similar problem. However, I tried your solution but it did not work.

In my case the http://<Site Name>/_layouts/login.aspx?ReturnUrl=%2flists%2ffeedback%2fnewform.aspx%3fsource%3d%2fpages%2fconfirmation.aspx%3fsource%3dhttp%3a%2f%2f<Site Name&source=/pages/confirmation.aspx?source=http://<Site Name>

When I replace the return url from realtive to absolute link it starts working. Can you please suggest me where should i change to get this working?

Thanks in advance,

sql

Error during FormsAuthentication.RedirectFromLoginPage

Greetings,

I created a custom security extenstion that worked great - except every call to

FormsAuthentication.RedirectFromLoginPage would result in a

"The return URL specified for request redirection is invalid." error type message.

I reverted back to windows security with no problem. Then used the Microsoft Forms Security example thinking maybee I had improperly implemented the interface.

When the forms security example provided by microsoft was configured I still get

"The return URL specified for request redirection is invalid." error type message.

Here is the actual query string when loging into the reportserver using the custom security extension:

http://<MACHINE_NAME>/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fPages%2fReportViewer.aspx%3f%252fMathReports%252fClass%2bProgress%2bChart%26ClassID%3d1514%26rs%3aCommand%3dRender&%2fMathReports%2fClass+Progress+Chart&ClassID=1514&rs:Command=Render

I have replaced the ip with <machine_name>. I have been working on this problem for 2 days with no solution. Help would be nice.

Thanks,

Ross B.

I noticed if I manually changed the ReturnURL in the address bar from

http://<MACHINE_NAME>/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fPages%2fReportViewer.aspx%3f%252fMathReports%252fClass%2bProgress%2bChart%26ClassID%3d1514%26rs%3aCommand%3dRender&%2fMathReports%2fClass+Progress+Chart&ClassID=1514&rs:Command=Render

to

http://<MACHINE_NAME>/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fPages%2fReportViewer.aspx%3f%2fMathReports%2fClass+Progress+Chart&ClassID=1514&rs:Command=Render

It almost looks like the redirect is duplicated in the query string - anyone know why this is?

|||

If I change functionality from

FormsAuthentication.RedirectFromLoginPage(TxtUser.Text, false);

To:

aUrl=Request.QueryString["ReturnUrl"];

FormsAuthentication.SetAuthCookie(TxtUser.Text,false);

Response.Redirect(aURL);

This works...however I am still puzzled as to what is causing the recommended way to fail in my setup.

Ross B.

|||

Hi,

I am facing a similar problem. However, I tried your solution but it did not work.

In my case the http://<Site Name>/_layouts/login.aspx?ReturnUrl=%2flists%2ffeedback%2fnewform.aspx%3fsource%3d%2fpages%2fconfirmation.aspx%3fsource%3dhttp%3a%2f%2f<Site Name&source=/pages/confirmation.aspx?source=http://<Site Name>

When I replace the return url from realtive to absolute link it starts working. Can you please suggest me where should i change to get this working?

Thanks in advance,

Monday, March 19, 2012

Error copying data to a remote sql server 2005 database.

When copying data to a remote SQL2K5 destination from a SQL2K5 source database, both using mixed sql server security mode, my job generates the following error:

[Transfer SQL Server Objects Task] Error: Execution failed with the following error: "Cannot apply value null to property Login: Value cannot be null..".

This occurs after the destination database tables have been truncated and replacement data from the source would begin to copy.

The same process can be successfully completed from the Management studio with a simple data export process. However, when I run the saved package again from the BI interface, I get this error.

My search engine searches have yielded numerous hits of others having the same problem with one microsoft rep indicating it was a bug and would be resolved in sp1. I am working with sp1. Oddly, there is only mention of this in the forums. No KB article from MS addresses the problem and I do not see it addressed elsewhere at sqlservercentral.

It appears that others have switched to Integrated Security and resolved the problem. However, I do not have that option with a remotely hosted database.

Does anyone have any information concerning this problem?

bug reports may be submitted here: SQL Server Feedback.

i suggest that you first check for the status of any existing bug report to avoid duplication.

Sunday, February 26, 2012

error code sql server

Good morning
MOM server 2005 prompt this message during the installation
Failed to setup database security.
Error code: -2147217900 (user, group, or role 'SC DW DTS'
already exist in the current database)
what can i do in this case
http://groups.google.co.uk/group/mic...hread/thread/9
fc353baf7bde8b8/45c77c865aeb54a8?lnk=st&q=user%2C+group%2C+or+role +'SC+DW+DT
S'+already+exists&rnum=1&hl=en#45c77c865aeb54a8
"Djeff" <e.djeff@.free.fr> wrote in message
news:mn.b33c7d5c80e5082d.46131@.free.fr...
> Good morning
> MOM server 2005 prompt this message during the installation
> Failed to setup database security.
> Error code: -2147217900 (user, group, or role 'SC DW DTS'
> already exist in the current database)
> what can i do in this case
>

error code sql server

Good morning
MOM server 2005 prompt this message during the installation
Failed to setup database security.
Error code: -2147217900 (user, group, or role 'SC DW DTS'
already exist in the current database)
what can i do in this casehttp://groups.google.co.uk/group/mi...thread/thread/9
fc353baf7bde8b8/45c77c865aeb54a8?lnk=st&q=user%2C+group%2C+or+role+'SC+DW+DT
S'+already+exists&rnum=1&hl=en#45c77c865aeb54a8
"Djeff" <e.djeff@.free.fr> wrote in message
news:mn.b33c7d5c80e5082d.46131@.free.fr...
> Good morning
> MOM server 2005 prompt this message during the installation
> Failed to setup database security.
> Error code: -2147217900 (user, group, or role 'SC DW DTS'
> already exist in the current database)
> what can i do in this case
>

error code sql server

Good morning
MOM server 2005 prompt this message during the installation
Failed to setup database security.
Error code: -2147217900 (user, group, or role 'SC DW DTS'
already exist in the current database)
what can i do in this casehttp://groups.google.co.uk/group/microsoft.public.mom/browse_thread/thread/9
fc353baf7bde8b8/45c77c865aeb54a8?lnk=st&q=user%2C+group%2C+or+role+'SC+DW+DT
S'+already+exists&rnum=1&hl=en#45c77c865aeb54a8
"Djeff" <e.djeff@.free.fr> wrote in message
news:mn.b33c7d5c80e5082d.46131@.free.fr...
> Good morning
> MOM server 2005 prompt this message during the installation
> Failed to setup database security.
> Error code: -2147217900 (user, group, or role 'SC DW DTS'
> already exist in the current database)
> what can i do in this case
>

Friday, February 24, 2012

error changing subscription properties

Hi

Made a change to the publisher security parameters, tried to save and got the following message:

"An error occurred saving the changes to the subscription.

Additional information.

"Value" is longer than 128 that it should not exceed.
Parameter name: value (Microsoft.sqlserver.rmo)

Doesn't make much sense to me.
Tried to change it back and all I get is this error (i had set the userid to domain/userid which was obviously an error).Hi, Bruce

Would you like provide more repro steps? And which version of SQL server are you using?

BTW, did you really input authentication login/password which is londer than 128 characters or any change will cause this error?

Also, when you tried to change back, were you stucked with this error or you succeeded in changing back.

Thanks
Yunjing|||

SQL 2005 standard - current release version

No it wasn't longer than 128

I'm stuck with it - I can't change it back....

Steps:
a) Well I had a 2005 subscription which was working fine (anonymous merge over HTTPS)
b) I made the mistake of changing the subscription properties-> publisher connection -> Use sql server authentication-> Login to domain\userid
c) pressed ok + ok - then got that error

Thanks

Bruce

|||

Hi, Bruce

Thanks for the info you provided.

I tried with 2005 anonymous merge pull sub with sync through web. But I couldn't reproduce the problem by following the steps you showed. I also read the product related source code and didn't find any code work different for changing login no matter for standard or enterprise SKU.

Did you change other sub properties value besides this login? Could you check if the issue was caused by other changes?

Thanks a lot

Yunjing

|||

Hi

It's a bit hard now to provide further info - I'm pretty sure it was the only thing I changed at the time....

thanks for your help anyway - this is a great service....
Bruce

|||

Thanks for all info you provided. If I can reproduce the issue in the future, I will let you know as well.

-Yunjing

error changing subscription properties

Hi

Made a change to the publisher security parameters, tried to save and got the following message:

"An error occurred saving the changes to the subscription.

Additional information.

"Value" is longer than 128 that it should not exceed.
Parameter name: value (Microsoft.sqlserver.rmo)

Doesn't make much sense to me.
Tried to change it back and all I get is this error (i had set the userid to domain/userid which was obviously an error).

Hi, Bruce

Would you like provide more repro steps? And which version of SQL server are you using?

BTW, did you really input authentication login/password which is londer than 128 characters or any change will cause this error?

Also, when you tried to change back, were you stucked with this error or you succeeded in changing back.

Thanks
Yunjing|||

SQL 2005 standard - current release version

No it wasn't longer than 128

I'm stuck with it - I can't change it back....

Steps:
a) Well I had a 2005 subscription which was working fine (anonymous merge over HTTPS)
b) I made the mistake of changing the subscription properties-> publisher connection -> Use sql server authentication-> Login to domain\userid
c) pressed ok + ok - then got that error

Thanks

Bruce

|||

Hi, Bruce

Thanks for the info you provided.

I tried with 2005 anonymous merge pull sub with sync through web. But I couldn't reproduce the problem by following the steps you showed. I also read the product related source code and didn't find any code work different for changing login no matter for standard or enterprise SKU.

Did you change other sub properties value besides this login? Could you check if the issue was caused by other changes?

Thanks a lot

Yunjing

|||

Hi

It's a bit hard now to provide further info - I'm pretty sure it was the only thing I changed at the time....

thanks for your help anyway - this is a great service....
Bruce

|||

Thanks for all info you provided. If I can reproduce the issue in the future, I will let you know as well.

-Yunjing

Wednesday, February 15, 2012

error adding Windows group security to database

I'm trying to add a Windows 2000 group to a database with
db_owner rights using the following:
sp_adduser 'MyDomain\sql-admins', 'sql-admins', 'db_owner'
GO
--
I'm encountering the following error:
Server: Msg 15007, Level 16, State 1, Procedure
sp_adduser, Line 15
The login 'MyDomain\sql-admins' does not exist.
--
The login does exist though.
Any help is appreciated.sp_adduser is for backwards compatibility only - try using
sp_grantdbaccess and sp_addrolemember. You can find more information
on these procedures in books online.
You can add a Windows group to the db_owner group using:
EXEC sp_addrolemember 'db_owner', 'YourDomain\YourGroup'
-Sue
On Fri, 21 May 2004 12:42:23 -0700, "Andy"
<anonymous@.discussions.microsoft.com> wrote:

>I'm trying to add a Windows 2000 group to a database with
>db_owner rights using the following:
>--
>sp_adduser 'MyDomain\sql-admins', 'sql-admins', 'db_owner'
>GO
>--
>I'm encountering the following error:
>--
>Server: Msg 15007, Level 16, State 1, Procedure
>sp_adduser, Line 15
>The login 'MyDomain\sql-admins' does not exist.
>--
>The login does exist though.
>Any help is appreciated.|||Thanks Sue, that worked.
However, I'm trying to use the function in an IF statement:
IF @.@.SERVERNAME = 'MyServer'
BEGIN
sp_revokedbaccess 'MyGroup'
GO
sp_grantdbaccess 'MyDomain\MyGroup', 'MyGroup'
GO
sp_addrolemember 'db_owner', 'MyGroup'
GO
END
I get the following error:
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near 'sp_revokedbaccess'.
I can execute the commands fine if they're not in the
BEGIN-END statement
Any ideas anyone?

>--Original Message--
>sp_adduser is for backwards compatibility only - try using
>sp_grantdbaccess and sp_addrolemember. You can find more
information
>on these procedures in books online.
>You can add a Windows group to the db_owner group using:
>EXEC sp_addrolemember 'db_owner', 'YourDomain\YourGroup'
>-Sue
>On Fri, 21 May 2004 12:42:23 -0700, "Andy"
><anonymous@.discussions.microsoft.com> wrote:
>
with[vbcol=seagreen]
admins', 'db_owner'[vbcol=seagreen]
>.
>|||Andy,
Try executing the block using something like:
BEGIN
exec sp_revokedbaccess 'MyGroup'
exec sp_grantdbaccess 'MyDomain\MyGroup', 'MyGroup'
exec sp_addrolemember 'db_owner', 'MyGroup'
END
-Sue
On Mon, 24 May 2004 07:45:42 -0700, "Andy"
<anonymous@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>Thanks Sue, that worked.
>However, I'm trying to use the function in an IF statement:
>IF @.@.SERVERNAME = 'MyServer'
> BEGIN
> sp_revokedbaccess 'MyGroup'
> GO
> sp_grantdbaccess 'MyDomain\MyGroup', 'MyGroup'
> GO
> sp_addrolemember 'db_owner', 'MyGroup'
> GO
> END
>I get the following error:
>Server: Msg 170, Level 15, State 1, Line 3
>Line 3: Incorrect syntax near 'sp_revokedbaccess'.
>I can execute the commands fine if they're not in the
>BEGIN-END statement
>Any ideas anyone?
>
>information
>with
>admins', 'db_owner'|||It worked.
My SQL is appearently a bit rusty, thanks again.
-Andy

>--Original Message--
>Andy,
>Try executing the block using something like:
>BEGIN
> exec sp_revokedbaccess 'MyGroup'
> exec sp_grantdbaccess 'MyDomain\MyGroup', 'MyGroup'
> exec sp_addrolemember 'db_owner', 'MyGroup'
> END
>-Sue
>On Mon, 24 May 2004 07:45:42 -0700, "Andy"
><anonymous@.discussions.microsoft.com> wrote:
>
statement:[vbcol=seagreen]
using[vbcol=seagreen]
more[vbcol=seagreen]
>.
>|||Your welcome...glad it's working for you now.
Don't think it's due to your SQL being rusty...a lot of
people get burned on both the exec and the go issues.
You need to use exec for executing a stored procedure when
the command is not the first command in a batch.
GO delimits a batch. When you put GO keywords inside
Begin...End blocks, the End is not sent to the server in the
same batch with the Begin so it's interpreted as a missing
END. You end up with the same effects you get as if you were
missing the closing parenthesis.
-Sue
On Mon, 24 May 2004 11:44:05 -0700,
<anonymous@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>It worked.
>My SQL is appearently a bit rusty, thanks again.
>-Andy
>
>statement:
>using
>more