Showing posts with label config. Show all posts
Showing posts with label config. Show all posts

Thursday, 22 March 2012

Connect to Local

Hey Guys,

I have a SQL connection string question. In my web.config I don't know what to put for the server. I have SQL Server 2005 installed locally.

<connectionStrings>
<add name="database" providerName="System.Data.SqlClient" connectionString= "server=whatgoeshere?;database=test;uid=sa;pwd=password" />
</connectionStrings>

I'm using VS 2005.

Thanks in advance.

-Marc

Try:
(local)

|||

thanks for the reply.

I'm trying to see if the connection string works using "local" but I'm having trouble with my code.

When I add this line: Dim sqlConn as new SQLconnection the "SQLconnection" errors.

I've tried importing SQL at the top but still doesn't work. Is there some reference I need to add?

Thanks.

|||

C# is case sensitive.

It should be Dim sqlConn as new SqlConnection();

|||

I'm actually using VB.

On this line: Dim SqlConn as New SqlConnection() the "SqlConnection()" has the blue line under it indicating an error.

I'm trying to figure out if I need to Import a namespace or maybe when I installed VS2005 I did something wrong.

Thanks.

|||

Try importing:
System.Data.SQLClient

|||

augustwind thanks for the help... it works. Using local for the db and using the import you suggested.

I have a quick question that you might be able to anwer. It VS 2003 whenever I would create a new proj it would store it in the C:\Inetpub\wwwroot blah blah blah. But when I create a new proj in VS2005 it saves it somewhere else. Do you know why that is?

Thanks again.

|||

Sorry - I know where - but I don't know why - -

Big Smile

Friday, 17 February 2012

configuring SQLDataSource with default database

Hello,

I have specified a default database in my web.config like this:

<dataConfigurationdefaultDatabase="scsLocal"/>

<connectionStrings>

<addname="scsLocal"connectionString="server=DRLSWARTEBRV;database=SCS;uid=******;password=******;"providerName="System.Data.SqlClient"/>

</connectionStrings>

Now I would like to configure a SQLDataSource control to use this default database, yet it prompts me for a connectionstring. I know I can program it in the code behind file (if I ommit connection string, it will use the default), but then I can make no use of the wizard for configuring the SQLDataSource which would safe me a lot of coding.

Is there a way to configure the SQLDataSource to use the default database that is specified in the web.config?

Thanks!

Veerle

Veerle:

<dataConfigurationdefaultDatabase="scsLocal"/>

I'm not sure about what you're trying to do with this but you can configure the SQLDataSource in your .aspx page like this:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:<the web.config parameter name>%>"
SelectCommand="You select query here"
<SelectParameters>
<if any>
</SelectParameters>
</asp:SqlDataSource>


Hope this will help.

Friday, 10 February 2012

Configure Server for Email Delivery

I am having trouble getting a report emailed for the first time.
The timed subscription has been set. I have updated the ReportServer.config
file to include the ip of the exchange server along with port number although
im not sure where to enter a password. The IT guys are making sure that the
exchange server will accept smtp requests from other servers. My question is
what is the best method to troubleshoot & is there anything gleeming that i
am missing. ThanksI have noted that the sql server agent has a job logged & shows suceeded when
last run but I have recieved any emails. I have also noted a job in the
process info that has a status of sleeping. Event log shows nothing
"Tango" wrote:
> I am having trouble getting a report emailed for the first time.
> The timed subscription has been set. I have updated the ReportServer.config
> file to include the ip of the exchange server along with port number although
> im not sure where to enter a password. The IT guys are making sure that the
> exchange server will accept smtp requests from other servers. My question is
> what is the best method to troubleshoot & is there anything gleeming that i
> am missing. Thanks|||Can anyone help, please. Maybe a link to a ReportServer.config that is
successfully emailing reports might help.
Thankyou
"Tango" wrote:
> I have noted that the sql server agent has a job logged & shows suceeded when
> last run but I have recieved any emails. I have also noted a job in the
> process info that has a status of sleeping. Event log shows nothing
> "Tango" wrote:
> > I am having trouble getting a report emailed for the first time.
> > The timed subscription has been set. I have updated the ReportServer.config
> > file to include the ip of the exchange server along with port number although
> > im not sure where to enter a password. The IT guys are making sure that the
> > exchange server will accept smtp requests from other servers. My question is
> > what is the best method to troubleshoot & is there anything gleeming that i
> > am missing. Thanks|||Tango,
Did you ever find out an answer to this? If so could you please share it?
"Tango" wrote:
> Can anyone help, please. Maybe a link to a ReportServer.config that is
> successfully emailing reports might help.
> Thankyou
> "Tango" wrote:
> > I have noted that the sql server agent has a job logged & shows suceeded when
> > last run but I have recieved any emails. I have also noted a job in the
> > process info that has a status of sleeping. Event log shows nothing
> >
> > "Tango" wrote:
> >
> > > I am having trouble getting a report emailed for the first time.
> > > The timed subscription has been set. I have updated the ReportServer.config
> > > file to include the ip of the exchange server along with port number although
> > > im not sure where to enter a password. The IT guys are making sure that the
> > > exchange server will accept smtp requests from other servers. My question is
> > > what is the best method to troubleshoot & is there anything gleeming that i
> > > am missing. Thanks|||It is notoriously difficult to get the subscriptions to work, I spent a week
configuring a production server trying to do this and gave up, I have the
feeling you need to re-install RS using different accounts/settings, which in
my case wasn't an option. I ended up coding a small windows service that
downloaded the report through a crafted URL and emailed it based on a
schedule in a table. It actually took less to code that snippet than to
configure the much glorified data driven subscription feature of RS.
Microsoft shouldn't be in such a hurry to advertise features that won't even
work in plain vanilla, no frills install out of the box.
Regards,
Tzepesh
"Tango" wrote:
> Can anyone help, please. Maybe a link to a ReportServer.config that is
> successfully emailing reports might help.
> Thankyou
> "Tango" wrote:
> > I have noted that the sql server agent has a job logged & shows suceeded when
> > last run but I have recieved any emails. I have also noted a job in the
> > process info that has a status of sleeping. Event log shows nothing
> >
> > "Tango" wrote:
> >
> > > I am having trouble getting a report emailed for the first time.
> > > The timed subscription has been set. I have updated the ReportServer.config
> > > file to include the ip of the exchange server along with port number although
> > > im not sure where to enter a password. The IT guys are making sure that the
> > > exchange server will accept smtp requests from other servers. My question is
> > > what is the best method to troubleshoot & is there anything gleeming that i
> > > am missing. Thanks|||Report server will only work against an SMTP server that accepts anonymous
or NTLM authentication. The best solution for email is to use a local SMTP
server as a relay to your smtp server. Set the pickup directory element in
the RSReportServer.config file to the local SMTP servers pickup directory
and the SendUsing element to 1. Then configure your local SMTP server to
relay the email to your actual SMTP server.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Tzepesh" <Tzepesh@.discussions.microsoft.com> wrote in message
news:547E777A-F7A3-4F9A-A7AA-236F22E04966@.microsoft.com...
> It is notoriously difficult to get the subscriptions to work, I spent a
> week
> configuring a production server trying to do this and gave up, I have the
> feeling you need to re-install RS using different accounts/settings, which
> in
> my case wasn't an option. I ended up coding a small windows service that
> downloaded the report through a crafted URL and emailed it based on a
> schedule in a table. It actually took less to code that snippet than to
> configure the much glorified data driven subscription feature of RS.
> Microsoft shouldn't be in such a hurry to advertise features that won't
> even
> work in plain vanilla, no frills install out of the box.
> Regards,
> Tzepesh
> "Tango" wrote:
>> Can anyone help, please. Maybe a link to a ReportServer.config that is
>> successfully emailing reports might help.
>> Thankyou
>> "Tango" wrote:
>> > I have noted that the sql server agent has a job logged & shows
>> > suceeded when
>> > last run but I have recieved any emails. I have also noted a job in the
>> > process info that has a status of sleeping. Event log shows nothing
>> >
>> > "Tango" wrote:
>> >
>> > > I am having trouble getting a report emailed for the first time.
>> > > The timed subscription has been set. I have updated the
>> > > ReportServer.config
>> > > file to include the ip of the exchange server along with port number
>> > > although
>> > > im not sure where to enter a password. The IT guys are making sure
>> > > that the
>> > > exchange server will accept smtp requests from other servers. My
>> > > question is
>> > > what is the best method to troubleshoot & is there anything gleeming
>> > > that i
>> > > am missing. Thanks