Showing posts with label managed. Show all posts
Showing posts with label managed. Show all posts

Monday, March 19, 2012

ClubSite template + sql server 2005 not cooperating...

I've managed to get the clubsite template from asp.net up and running, sorda (http://www.flysniper.com), I get a system error which I believe is related to the fact that my DB isn't working correctly.

I'm trying to configure it to work with ms sql server 2005 which is running on the same machine as the website.

I've followed the instructions of Scott Gu (http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx)

while trying to run aspnet_regsql.exe I get the following error

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727>aspnet_regsql.exe -S XXXXXXXXXX
-U YYYYYYYY -P ZZZZZZZZZ -A all -d flysniper

Start adding the following features:
Membership
Profile
RoleManager
Personalization
SqlWebEventProvider

.................
An error has occurred. Details of the exception:
An error has occurred while establishing a connection to the server. When conne
cting to SQL Server 2005, this failure may be caused by the fact that under the
default settings SQL Server does not allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Unable to connect to SQL Server database.

I have tried several different things (shooting in the dark) to resolve this issue, including:

verifing that port 445 is avaliable on the firewall per these directions:http://support.microsoft.com/default.aspx?scid=kb;en-us;839269

configured SQL server 2005 to allow remote connections following these directions:http://support.microsoft.com/kb/914277

with no change in results.

Anything else I should look into?

Thanks in advance,

Mike

I get that message when I forget to start sql server before trying to connect to the website.

|||

LockH - thanks for your response, I have confirmed that the SQL Service is up and running.

UPDATE: I have managed to get the aspnet_regsql.exe to run and the tables are created.

I have tried to set the connection string up correctly: <addname="ClubSiteDB"connectionString="Data Source=StormTrooper\FlySniper;Initial Catalog=FlySniperDev;Persist Security Info=True;User ID=XXXXXXXXXXXXX;Password=YYYYYYYYYYYY;"providerName="System.Data.SqlClient"/>

I think its just a switch somewhere that I'm missing.

I have set up a developer website for testing purposes, please usehttp://dev.flysniper.com/flysniperClubSite to see the actual error.

TIA,

Mike

|||

Did you create the tables in the database on the server, or did you copy the database files from your dev machine?

If you copied the database files onto that machine, did you go into database admin and attach the database files to that server?

|||

The tables were created directly on the server. It's my personal machine so I have direct access to it.

Thanks for you time,

Mike

Sunday, March 11, 2012

CLR Stored Procedure Exception Handling

Hi,

1) Is there a way to define a global unhandled exception
handler in managed stored procedures?

Something like we're used to in Winform project:

AppDomain.CurrentDomain.UnhandledException
+= new UnhandledExceptionEventHandler(MyHandler);

(I've tried the latter but get some security exception.)

2) Same question about MS Office CLR unhandled exceptions handler...

3) Also, for WebServices Stored Procedure, is there a way to
customize the SOAP Exception <detail> node?

Thanks
Martin1. This is not possible inside SQL Server. If any exception is not handled, SQL Server catches it and sends an appropriate error message to the user. SQL Server does not allow you to specify your own handler for unhandled exceptions.
2. What is the question here? SQL Server does not install an unhandled exception handler.
3. Through native Web Services in SQL Server 2005, there is no mechanism for the user to control what the SOAP fault contains. The old SQL 2000 ASP.Net Web Services mechanism will continue to allow you to capture the Sql exception in the mid-tier and craft the SOAP fault that goes back to the client.

Thanks,
-Vineet Rao

Sunday, February 19, 2012

Client side printing

Hi
I am trying to print Query Result directly to the printer from Client
machine. I managed to do this on Server machine. Where I had written SP whic
h
accepts SQL as parameter and using osql and xp_cmdShell command I am
outputting CSV file to printer. I want to do same from client machine but I
want print out should get printed on client printer not on Server.
Any ideas or suggestions'
Many thanks in advance.
Regards,
Santoshxp_cmdshell is executed on the server machine, which has no knowledge of the
client who submitted
the SQL command. Perhaps you can specify the printer name using UNC naming s
o the print is done on
the server machine, but the destination is specified as the client?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Santosh" <Santosh@.discussions.microsoft.com> wrote in message
news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
> Hi
> I am trying to print Query Result directly to the printer from Client
> machine. I managed to do this on Server machine. Where I had written SP wh
ich
> accepts SQL as parameter and using osql and xp_cmdShell command I am
> outputting CSV file to printer. I want to do same from client machine but
I
> want print out should get printed on client printer not on Server.
> Any ideas or suggestions'
> Many thanks in advance.
> Regards,
> Santosh
>|||Thanks Tibor, yes what you are suggesting, makes sense.
But I feel it will be better if I drop this idea and look for some different
option. Because if we want to specify UNC naming for printer. I need to make
printer as shared and need to give permissions so it can be accessible from
server by other users. Since printers are getting cheaper and cheaper, almos
t
everyone at client-side got there own printers, so I doubt if client admin
will accept this solution.
"Tibor Karaszi" wrote:

> xp_cmdshell is executed on the server machine, which has no knowledge of t
he client who submitted
> the SQL command. Perhaps you can specify the printer name using UNC naming
so the print is done on
> the server machine, but the destination is specified as the client?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Santosh" <Santosh@.discussions.microsoft.com> wrote in message
> news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
>
>|||I agree with your assessment. Can you do the printing from the client app (w
hich I assume is running
on the client machine already)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...[vbcol=seagreen]
> Thanks Tibor, yes what you are suggesting, makes sense.
> But I feel it will be better if I drop this idea and look for some differe
nt
> option. Because if we want to specify UNC naming for printer. I need to ma
ke
> printer as shared and need to give permissions so it can be accessible fro
m
> server by other users. Since printers are getting cheaper and cheaper, alm
ost
> everyone at client-side got there own printers, so I doubt if client admin
> will accept this solution.
>
>
> "Tibor Karaszi" wrote:
>|||Yup I can Print Crystal reports on local client printer through client app.
Now I have written small code in Vb.net which accepts SQL from client PC and
prints result in CSV format on local client printer.
"Tibor Karaszi" wrote:

> I agree with your assessment. Can you do the printing from the client app
(which I assume is running
> on the client machine already)?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
> news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...
>
>

Client side printing

Hi
I am trying to print Query Result directly to the printer from Client
machine. I managed to do this on Server machine. Where I had written SP which
accepts SQL as parameter and using osql and xp_cmdShell command I am
outputting CSV file to printer. I want to do same from client machine but I
want print out should get printed on client printer not on Server.
Any ideas or suggestions?
Many thanks in advance.
Regards,
Santosh
xp_cmdshell is executed on the server machine, which has no knowledge of the client who submitted
the SQL command. Perhaps you can specify the printer name using UNC naming so the print is done on
the server machine, but the destination is specified as the client?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Santosh" <Santosh@.discussions.microsoft.com> wrote in message
news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
> Hi
> I am trying to print Query Result directly to the printer from Client
> machine. I managed to do this on Server machine. Where I had written SP which
> accepts SQL as parameter and using osql and xp_cmdShell command I am
> outputting CSV file to printer. I want to do same from client machine but I
> want print out should get printed on client printer not on Server.
> Any ideas or suggestions?
> Many thanks in advance.
> Regards,
> Santosh
>
|||Thanks Tibor, yes what you are suggesting, makes sense.
But I feel it will be better if I drop this idea and look for some different
option. Because if we want to specify UNC naming for printer. I need to make
printer as shared and need to give permissions so it can be accessible from
server by other users. Since printers are getting cheaper and cheaper, almost
everyone at client-side got there own printers, so I doubt if client admin
will accept this solution.
"Tibor Karaszi" wrote:

> xp_cmdshell is executed on the server machine, which has no knowledge of the client who submitted
> the SQL command. Perhaps you can specify the printer name using UNC naming so the print is done on
> the server machine, but the destination is specified as the client?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Santosh" <Santosh@.discussions.microsoft.com> wrote in message
> news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
>
>
|||I agree with your assessment. Can you do the printing from the client app (which I assume is running
on the client machine already)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...[vbcol=seagreen]
> Thanks Tibor, yes what you are suggesting, makes sense.
> But I feel it will be better if I drop this idea and look for some different
> option. Because if we want to specify UNC naming for printer. I need to make
> printer as shared and need to give permissions so it can be accessible from
> server by other users. Since printers are getting cheaper and cheaper, almost
> everyone at client-side got there own printers, so I doubt if client admin
> will accept this solution.
>
>
> "Tibor Karaszi" wrote:
|||Yup I can Print Crystal reports on local client printer through client app.
Now I have written small code in Vb.net which accepts SQL from client PC and
prints result in CSV format on local client printer.
"Tibor Karaszi" wrote:

> I agree with your assessment. Can you do the printing from the client app (which I assume is running
> on the client machine already)?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
> news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...
>
>

Client side printing

Hi
I am trying to print Query Result directly to the printer from Client
machine. I managed to do this on Server machine. Where I had written SP which
accepts SQL as parameter and using osql and xp_cmdShell command I am
outputting CSV file to printer. I want to do same from client machine but I
want print out should get printed on client printer not on Server.
Any ideas or suggestions'
Many thanks in advance.
Regards,
Santoshxp_cmdshell is executed on the server machine, which has no knowledge of the client who submitted
the SQL command. Perhaps you can specify the printer name using UNC naming so the print is done on
the server machine, but the destination is specified as the client?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Santosh" <Santosh@.discussions.microsoft.com> wrote in message
news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
> Hi
> I am trying to print Query Result directly to the printer from Client
> machine. I managed to do this on Server machine. Where I had written SP which
> accepts SQL as parameter and using osql and xp_cmdShell command I am
> outputting CSV file to printer. I want to do same from client machine but I
> want print out should get printed on client printer not on Server.
> Any ideas or suggestions'
> Many thanks in advance.
> Regards,
> Santosh
>|||Thanks Tibor, yes what you are suggesting, makes sense.
But I feel it will be better if I drop this idea and look for some different
option. Because if we want to specify UNC naming for printer. I need to make
printer as shared and need to give permissions so it can be accessible from
server by other users. Since printers are getting cheaper and cheaper, almost
everyone at client-side got there own printers, so I doubt if client admin
will accept this solution.
"Tibor Karaszi" wrote:
> xp_cmdshell is executed on the server machine, which has no knowledge of the client who submitted
> the SQL command. Perhaps you can specify the printer name using UNC naming so the print is done on
> the server machine, but the destination is specified as the client?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Santosh" <Santosh@.discussions.microsoft.com> wrote in message
> news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
> > Hi
> >
> > I am trying to print Query Result directly to the printer from Client
> > machine. I managed to do this on Server machine. Where I had written SP which
> > accepts SQL as parameter and using osql and xp_cmdShell command I am
> > outputting CSV file to printer. I want to do same from client machine but I
> > want print out should get printed on client printer not on Server.
> >
> > Any ideas or suggestions'
> >
> > Many thanks in advance.
> >
> > Regards,
> > Santosh
> >
>
>|||I agree with your assessment. Can you do the printing from the client app (which I assume is running
on the client machine already)?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...
> Thanks Tibor, yes what you are suggesting, makes sense.
> But I feel it will be better if I drop this idea and look for some different
> option. Because if we want to specify UNC naming for printer. I need to make
> printer as shared and need to give permissions so it can be accessible from
> server by other users. Since printers are getting cheaper and cheaper, almost
> everyone at client-side got there own printers, so I doubt if client admin
> will accept this solution.
>
>
> "Tibor Karaszi" wrote:
>> xp_cmdshell is executed on the server machine, which has no knowledge of the client who submitted
>> the SQL command. Perhaps you can specify the printer name using UNC naming so the print is done
>> on
>> the server machine, but the destination is specified as the client?
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> http://www.sqlug.se/
>>
>> "Santosh" <Santosh@.discussions.microsoft.com> wrote in message
>> news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
>> > Hi
>> >
>> > I am trying to print Query Result directly to the printer from Client
>> > machine. I managed to do this on Server machine. Where I had written SP which
>> > accepts SQL as parameter and using osql and xp_cmdShell command I am
>> > outputting CSV file to printer. I want to do same from client machine but I
>> > want print out should get printed on client printer not on Server.
>> >
>> > Any ideas or suggestions'
>> >
>> > Many thanks in advance.
>> >
>> > Regards,
>> > Santosh
>> >
>>|||Yup I can Print Crystal reports on local client printer through client app.
Now I have written small code in Vb.net which accepts SQL from client PC and
prints result in CSV format on local client printer.
"Tibor Karaszi" wrote:
> I agree with your assessment. Can you do the printing from the client app (which I assume is running
> on the client machine already)?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
> news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...
> > Thanks Tibor, yes what you are suggesting, makes sense.
> >
> > But I feel it will be better if I drop this idea and look for some different
> > option. Because if we want to specify UNC naming for printer. I need to make
> > printer as shared and need to give permissions so it can be accessible from
> > server by other users. Since printers are getting cheaper and cheaper, almost
> > everyone at client-side got there own printers, so I doubt if client admin
> > will accept this solution.
> >
> >
> >
> >
> > "Tibor Karaszi" wrote:
> >
> >> xp_cmdshell is executed on the server machine, which has no knowledge of the client who submitted
> >> the SQL command. Perhaps you can specify the printer name using UNC naming so the print is done
> >> on
> >> the server machine, but the destination is specified as the client?
> >>
> >> --
> >> Tibor Karaszi, SQL Server MVP
> >> http://www.karaszi.com/sqlserver/default.asp
> >> http://www.solidqualitylearning.com/
> >> http://www.sqlug.se/
> >>
> >>
> >> "Santosh" <Santosh@.discussions.microsoft.com> wrote in message
> >> news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
> >> > Hi
> >> >
> >> > I am trying to print Query Result directly to the printer from Client
> >> > machine. I managed to do this on Server machine. Where I had written SP which
> >> > accepts SQL as parameter and using osql and xp_cmdShell command I am
> >> > outputting CSV file to printer. I want to do same from client machine but I
> >> > want print out should get printed on client printer not on Server.
> >> >
> >> > Any ideas or suggestions'
> >> >
> >> > Many thanks in advance.
> >> >
> >> > Regards,
> >> > Santosh
> >> >
> >>
> >>
> >>
>
>