Tuesday, March 27, 2012
Forms authentication sample and Win XP pro /win 2k3 server
as a security extension, but since i upgraded my system to sp2 it stopped
working, besides it doent work on a win2k3 server but it works on a win2k,
the problems seems to be with ssl im using the selfssl utility to get my
cerificates as im still working on a test environment, but even if i get a
test certificate from a trusted provider it tells me it doenst trust it. the
message is the following " The underlying connection was closed: Could not
establish trust relationship with remote server. "
this happens when calling the logonuser method using soap, ive tried
changing all the adresses in the config files for https but it doesnt work.Have a look at
http://support.microsoft.com/default.aspx?scid=kb;en-us;823177
I've used this to get around the same issue in a WinForms app
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Rodrigo" <Rodrigo @.discussions.microsoft.com> wrote in message
news:3D0B1EF9-B419-4B14-AC19-39BEC39F8800@.microsoft.com...
>I developed an app which uses the forms authentication sample from
>microsoft
> as a security extension, but since i upgraded my system to sp2 it stopped
> working, besides it doent work on a win2k3 server but it works on a win2k,
> the problems seems to be with ssl im using the selfssl utility to get my
> cerificates as im still working on a test environment, but even if i get a
> test certificate from a trusted provider it tells me it doenst trust it.
> the
> message is the following " The underlying connection was closed: Could
> not
> establish trust relationship with remote server. "
> this happens when calling the logonuser method using soap, ive tried
> changing all the adresses in the config files for https but it doesnt
> work.
>|||also see :
http://sqljunkies.com/WebLog/roman/archive/category/370.aspx
Monday, March 26, 2012
Forms Authentication and integrating with an existing Web App
I was hoping someone could help me with this.
I have set up a Reporting Services installation to use forms authentication as described on the MSDN page http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp. By itself it is working fine.
Now I would like to integrate access to reports from this instance of Reporting Services from into an existing ASP.NET Web Application that also uses forms authentication.
The problem I have is that I can't seem to get both Reporting Services and the Web Application to use a common forms authentication cookie. Even if I give the <forms> element the same name in both the web.config for the report server and the web.config for the custom web app - one application still don't seem to see the authentication cookie generated by the other.
The ultimate goal is to have a web application, with a single forms authentication login page, that enables users to access reporting services reports.
Any help would be greatly appreciated.
Sincerely,
DannyI just came across the article 'Forms Authentication Across Applications' that discusses the requirement of matching attributes in the forms element and machineKey element.
I assume this matches my scenario so I will try it out and see how it goes.
Please, do reply to this post however if you have anything to contribute.
"Danny" wrote:
> Hello,
> I was hoping someone could help me with this.
> I have set up a Reporting Services installation to use forms authentication as described on the MSDN page http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp. By itself it is working fine.
> Now I would like to integrate access to reports from this instance of Reporting Services from into an existing ASP.NET Web Application that also uses forms authentication.
> The problem I have is that I can't seem to get both Reporting Services and the Web Application to use a common forms authentication cookie. Even if I give the <forms> element the same name in both the web.config for the report server and the web.config for the custom web app - one application still don't seem to see the authentication cookie generated by the other.
> The ultimate goal is to have a web application, with a single forms authentication login page, that enables users to access reporting services reports.
> Any help would be greatly appreciated.
> Sincerely,
> Danny
Friday, March 23, 2012
Formatting Question
CDate(Date1_MO & "/" & Date1_DA & "/" & Date1_CN & Format(Date1_YR,"00"))
Piece of cake...however I am struggling with this in MSSQL.
Mostly I am fighting formatting the Year. As you can see, If I were to concatinate the above values i would come up with something like 3/9/204 for a date of March 9, 2004. (Each field is a numeric value).
I have gotten this far...
select CAST(Date1_MO as varchar(2))+ '/' + CAST(Date1_DA as varchar(2))
+ '/' + CAST(Date1_CN as varchar(2))+ CAST(Date1_YR as varchar(2)) as Date1
From tPrices
I still need to convert the whole string to a date, but more importantly, I cannot figure out how to get the last element (Year) to format as '04' instead of '4'. I can't concatinate a 0 in front of it for obvious reasons. (Athough I was tempted, just joking)
I looked through a lot of the T-SQL docs but have come up dry.
Anyway HELP!!!!!!Try this for the last 2 digits of the year:
right('0'+CAST(Date1_YR as varchar(2)), 2)|||Came to the same conclusion about the same time you replied...
Just playing with the conversion now.
Thanks for your response...
Monday, March 12, 2012
Formatting @query results using xp_sendmail
but this is the situation I must develop in so any help would be
appreciated.
I'm running the following in Query Analyzer
USE Pubs
DECLARE @.MessageSubject VARCHAR(50)
SELECT @.MessageSubject = 'Report'
EXEC master.dbo.xp_sendmail 'me@.mine.com',
@.query = 'SELECT au_fname, au_lname from pubs.dbo.authors',
@.subject = @.MessageSubject
The results in my email look like:
au_fname au_lname
------ ------------
Abraham Bennet
Reginald Blotchet-Halls
Cheryl Carson
I would like the results to be like:
First Name: Abraham
Last Name: Bennet
First Name: Reginald
Last Name: Blotchet-Halls
First Name: Cheryl
Last Name: Carson
Thanks"Terri" <Terri@.spamaway.com> wrote in message
news:c0u48d$tn2$1@.reader2.nmix.net...
> I know formatting should be handled in the client app and not in SQL
Server
> but this is the situation I must develop in so any help would be
> appreciated.
> I'm running the following in Query Analyzer
> USE Pubs
> DECLARE @.MessageSubject VARCHAR(50)
> SELECT @.MessageSubject = 'Report'
> EXEC master.dbo.xp_sendmail 'me@.mine.com',
> @.query = 'SELECT au_fname, au_lname from pubs.dbo.authors',
> @.subject = @.MessageSubject
> The results in my email look like:
> au_fname au_lname
> ------ ------------
> Abraham Bennet
> Reginald Blotchet-Halls
> Cheryl Carson
> I would like the results to be like:
> First Name: Abraham
> Last Name: Bennet
> First Name: Reginald
> Last Name: Blotchet-Halls
> First Name: Cheryl
> Last Name: Carson
> Thanks
See CHAR() in Books Online - you could try something like this:
select
'First Name: ' + au_fname + char(13) + 'Last Name: ' + au_lname +
char(13) + char(13)
from
pubs.dbo.authors
Simon|||"Simon Hayes" <sql@.hayes.ch> wrote in message
news:403292f4$1_2@.news.bluewin.ch...
> See CHAR() in Books Online - you could try something like this:
> select
> 'First Name: ' + au_fname + char(13) + 'Last Name: ' + au_lname +
> char(13) + char(13)
> from
> pubs.dbo.authors
This works, thanks.
@.query = 'select ''First Name: '' + au_fname + char(13) + ''LastName: '' +
au_lname + char(13) from pubs.dbo.authors',
Sunday, February 19, 2012
format column data
Hi,
I am entering values from .Net app to a table in Sql 2k. The Identity field needs to be in 'ABC0000012' format (3 fixed letters and 7 digits - incremented by 1). My code MUST BE within a stored_proc. I am trying to format the column to have reqd. number of preceeding zeros. How can I get those ?
Pls help.
Sam
I am not sure exactly what you mean but I am going to take a guess.... Does this help?
Foo = "ABC" & SubStr(CStr(10000000 + id),2,7)
|||
Sara.. Thanks for guess.. here is what I am trying:
I have a constant prefix to which I need to apend value in the Identity column (should be 7 digits) -- so the total alpha numeric number will be 10 places:
examples:
say ID column value is 2 my final output should look like ABC0000002
say ID column value is 123 my final output should look like ABC0000123
say ID column value is 123456 my final output should look like ABC0123456
question is how to pad ID column value with preceeding zeroes?
Thanks, Sam
|||SELECT
'ABC' + right('0000000'+ convert(varchar,[id]), 7)
, othercolumns
FROM
yourTable