Configuration :: Preparing External SQL Database Fo .NET Web Application?

Sep 30, 2010

It's been so long since I've done this that I don't remember how.

Basically, I am creating a Web Application from scratch. I have dragged the LoginBox to the page and went to "Administer Website". Unfortunatel I see no where where I can choose to have the application talk to an externally-hosted database as opposed to defaulting to the "App_Data" folder. I am hosting an SQL instance named "SQLEPXRESS" on my development machine and have configured a database and user. I wish for the site to use this database and user and have set the connectionstring as follows in the web.config:

<add name="ConnectionString" connectionString="Data Source=RUSSELL-DESKTOPSQLEXPRESS;DATABASE=db;UID=user;PWD=pass" providerName="System.Data.SqlClient"/>

Yet even after adding that I see it showing no where in the "Administer Website" section. Please walk me through getting my application to talk to this database and configuring the necessary tables. I remember there needing to be some sort of exe I needed to run to do this, but my Google and forum searching is failing me.

View 1 Replies

Similar Messages:

C# - Application Only Partially Reading External Configuration

May 27, 2010

I have an ASP.NET web app and am attempting to reference an external config (using enterprise application blocks configuration) for some of the configuration but it is not entirely working. I previously had all of the configuration info in the web.config (and it was working), but we are wanting to share some of this configuration information between multiple apps. When I put configurationSource tag in the web.config, and read the configuration through the WebConfigurationManager object, it loads some of the external config info (Logging) but not the connectionStrings and not the custom section I created. So it's reading it (logging is working), but some dots aren't being connected and my connection strings aren't coming through.

Again, it worked when it was all in the web.config. I am running .NET 3.5. Any idea what needs to change to be able to reference an external configuration source and have it all come through?

[Code that accesses web.config]
Configuration webConfig =
ConnectionStringSettingsCollection connectionStrings =
<section name="enterpriseLibrary.ConfigurationSource" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ConfigurationSourceSection, Microsoft.Practices.EnterpriseLibrary.Common, Version=, Culture=neutral, PublicKeyToken=74025d8738dfe4ce" />
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />

<enterpriseLibrary.ConfigurationSource selectedSource="File Configuration Source">
<add name="File Configuration Source" type="Microsoft.Practices.EnterpriseLibrary.Common.Configuration.FileConfigurationSource, Microsoft.Practices.EnterpriseLibrary.Common, Version=, Culture=neutral, PublicKeyToken=74025d8738dfe4ce"
filePath="C:MSEABMSEAB.config" />
[external MSEAB.config]
<section name="loggingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.LoggingSettings, Microsoft.Practices.EnterpriseLibrary.Logging, Version=, Culture=neutral, PublicKeyToken=74025d8738dfe4ce" />
<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=, Culture=neutral, PublicKeyToken=74025d8738dfe4ce" />
<sectionGroup name="customSectionGroup">
<section name="customSection" type="app.CustomSection" allowLocation="true" allowDefinition="Everywhere" />
<loggingConfiguration name="Logging Application Block" tracingEnabled="true"
defaultCategory="General" logWarningsWhenNoCategoriesMatch="true">
<clear />
<add name="DB.DEV" connectionString="User ID=user;Password=pwd;Data Source=DV1;" providerName="Oracle.DataAccess.Client"/>
<add name="DB.TEST" connectionString="User ID=user;Password=pwd;Data Source=TS1;" providerName="Oracle.DataAccess.Client"/>
<customSection notificationemail="" dirPath="C:Dir" initialrowlimit="500" maxrowlimit="1500" adminadgroup="_admins">

View 1 Replies

Preparing A Database Driven Site Before Going Live?

May 18, 2010

I've got a really good idea for a service I'd like to create for the web, but since I'm new to ASP.NET I'd like to get everything up and running before I go and buy hosting etc.

What I'm curious about is the database side of things.

I don't quite understand how I can create a datebase on my computer for the sake of testing and practicing (Presumably through mssql server) and then just transfer it to a hosting account when I'm ready.

I guess the main part I don't understand is how can I connect to a database on my computer via my application and then change the connection so that it points to the web version when I'm ready.

I know that when you create the database and include it in your project it's not technically inside your project (Right?), but it just seems that the application is very rigid once you've specified the connection.

View 14 Replies

Configuration :: Connecting Application To Online DataBase

Oct 1, 2010

I have all my tables and queries in online DB ie., i have created all my tables and queries in online using third party site [URL] Now i want to make connect my application (which is in my system) with that database

View 5 Replies

Configuration :: Create Setup For Web Application With Database?

Jan 3, 2011

I have created a setup application and i want to create my application as an installer application.

I did for testing and while running the setup file this give me the final response is "The installer was interrupted before setup1 could be completed. You need to restart the installer to try again".

View 1 Replies

Configuration :: Application Deployment - Database Connection?

Sep 28, 2010

I finished an intranet application using webconfig to store my connection string to an Access database which has linked tables to SQL Server 2005.

Everything works perfectly, but when I publish the application on a IIS server service, it seems like all connections fail... :(

I looked up on internet but found nothing on this. I think my webconfig file is correct :


View 16 Replies

Configuration :: How To Upload A Web Application And SQL Database ON Development Server.

Jun 17, 2010

I never host any web application on the development server.I learn the tutorial how to copy the file using file zilla FTP client.But question is raised, how can I link my sql server machine to Http development server.And how can I configure my database on the development server.What at all DNS setting is require?

Finally All I need is , upload a web application and SQL server database on development server.

View 1 Replies

Configuration :: Reflection + External Dll?

Mar 12, 2010

i have one interface . for which i need to send the input.input can be differe for person to person .i want to create a custom section in app.config .

<customsection url="">

for this i can create a libaray and do it ..many different libarray for many people with interface inclued in all ..this is want i need to do ...but the problem for me s i dont know wat library he s going to give me .. client will give me only the dll and i hv find the class name and its corresponding custom sectipon and call the interface method and get the output ..Reflection s the way but i dont know how to do it ...

View 2 Replies

Configuration :: Database Version Error While Deploying Application On Windows XP?

Jul 15, 2010

I developed an application using VS2010 and now when i try to deploy it on windows XP maching running IIS 5.1 i get the database version error which says:

The database '<database file path>' cannot be opened because it is version 655. This server supports version 612 and earlier. A downgrade path is not supported.

<database file path> . Create is aborted.

An attempt to attach an auto-named database for file <database file path> failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

View 3 Replies

Preparing An ASP.Net Website For Penetration Testing?

Nov 8, 2010

Over the years I have had a few of the websites I have developed submitted for penetration testing by clients. Most of the time the issues that are highlighted when the results return relate to the default behaviour of ASP .Net such as possible cross site scripting attacks etc.Are there any good articles on which vulnerabilities exist by default in an ASP .Net application and secondly are there any good checklists to follow which will help prepare a site in advance?

View 2 Replies

DataSource Controls :: Re: Preparing A Leave Module Using Calender?

Jun 22, 2010

have been working on a leave module and it created this problem. I am trying to identify the end date from a given start date after deducting the public holidays including Fridays & Saturdays. It works like this,Suppose, the starting date is '22-Jun-2010' and the No of days employee wishes to take for leave is 25 days. I wanted to calculate the end date excluding the public holidays (Fridays and Saturdays).For ExampleLeave Requested - Start Date = '22/06/2010'No of days requested = 25 DaysPublic Holiday (National Day) = '26/07/2010'Public Holiday (On the occasion) = '27/07/2010'Output: Leave Start Date: '22/06/2010'
Leave End Date: 28/06/2010'(End Date must be calculated without including the Fridays and Saturdaysor any given Public Holiday[National Day &On the occasion] - )

View 4 Replies

Configuration ::access The Second External Config File From Same Webconfig

May 11, 2010

how can i access 2 external config files from web.config file.

i have done it for one external file like this in webconfig:

<appSettings file="........">

Now how can i access the second external config file from same webconfig.

View 1 Replies

Configuration :: How To Compose Website With External Aspx Page

Mar 18, 2010

I have a simple webApplication. Now I have a second webapplication with few web aspx pages. When I build each project I get aspx files with 1 dll per project.

Now the structure of the first webApplication is like this



Is it possible to load the dll of the second application dynamically and put its dll into the bin directory. The result will be something like this:





The problem is that when I try to open application2default.aspx the compiler is throwing an error that it cannot find the class for that particular page because the assembly inwebapplication2.dll is not loaded. I tried to load the assembly from the web config like this <add assembly="myassemly, Version=, PublicKeyToken=null, Culture=neutral"/> and also from the code like this Assembly.LoadFrom( @"D:Projectsinmyassemly.dll" ); OR Assembly.Load( "myassemly, Version=, PublicKeyToken=null, Culture=neutral" ); but I still have no success. Can u tell me what is the logic here with the assembly load?

View 2 Replies

Configuration :: App Works Well On Local Intranet, But Having Problema On External Access?

Nov 3, 2010

App works well on local intranet, but having problema on external access?

View 4 Replies

Configuration :: External Mail Not Sending - Exchange Server As Host?

Aug 4, 2010

Using Visual Studio 2010 Web Developer Express ( code) with SqlDataSource to SQL Server 2008.

I am developing an email form to my users to send email to vendors with an attachment. The aspx page is quite simple -- 2 dropdownlists, a fileupload control, and a send email button. They select their store (which populates the "From" address of the email). They select the Vendor (which populates the "To" address of the email). Then they browse for the file attachment and click "send email"

I just can't get outside emails to send. I do not get any error messages in the web page. If I change the email1 and email2 in SQL Server Vendor table to an email address (mine) within the domain I get the emails. However when I change to a test hotmail, yahoo, or gmail accounts the emails never get there. I have absolutely no confidence that my programming is correct so before I go to the IT Manager again I really need to verify I am not missing something on my end. We did make a change on the exchange server to allow anonymous email from my webserver and still didn't work.

Here is my webconfig file:


Here is my code-behind:


Here is my aspx page:


I have been playing around with the programming for 2 days making 1 change at a time then testing to see if external email is sending. I'm going quite crazy at this point ...

I've put in breakpoints and debugged. Below is the output from the latest test. I have concerns about the clientDomain being "SQLSVR" which is my webserver name, our domain is "". As well as the line "Domain" that is blank " " under NetworkCredential. Also the line TargetName "SMTPSVC/exchangesvr"


View 2 Replies

Web Forms :: Saving XML File At The External Application?

Apr 7, 2010

I'm trying to figure out how to save my XML file in the outside location.

I have a Main web app that uses an XML file as a datasource for one of it's pages. This XML file is generated manually by accessing a utuility page in the same app. I created a utility app that resides outside of the Main app ( it's on my C:/Inetpub/wwwroot) but it should save an XML file in the directory of the Main applicatoin. My utility works fine if I need to save to C:/Inetpub/wwwroot/XMLFiles) but I when I try to access the file at the Main application something like that:


It gives me an error: System.Web.HttpException: Cannot use a leading .. to exit above the top directory. If I just type full URL it says that URI cannot be resolved.. How can I access that Tests.xml file to update it?

View 6 Replies

Execute An External Application Such That Each Visitor Gets Isolated?

Jul 21, 2010

Actually I don't know whether my question is related to this thread.

I want to create a web application using ASP.NET MVC 2.

For simplicity, let my scenario be as follows:

A visitor is allowed to submit a text file and get a pdf output from the server.

There is an Adobe-Acrobat-like application, that can convert text to pdf, running on my server.

My question is how to execute the converter such that each visitor submitting files cannot interfere with others?

Should I make an instance of the converter for each visitor?

View 4 Replies

Configuration :: Put MembershipProvider, ProfileProvider And RoleProvider In One Single External Config File?

Oct 5, 2010

How can I put MembershipProvider, ProfileProvider and RoleProvider in one single external config file?

View 1 Replies

How To Integrate An External Web Control Into A SharePoint Application's Page

Feb 15, 2010

How to integrate an external web ASP.NET control into a SharePoint application's page?

View 2 Replies

Security :: Accessing Reporting Application From External Network?

Dec 7, 2010

We have an issue with an internal application, where accessing it from LAN (private n/w) works fine, while access from external n/w throws up erratic behavior.

The Current System :

an aspx page (asp version 1.0) hosted on the IIS server (6.1). The front end is a vb form that connects to a sql 2000 database.

Users' credentials authorized using NTLM security.

Access from an external n/w - a reverse proxy configured with an ISA server 2006 to authenticate credentials.

Domain Controller - Windows Server 2008 R2 x64

The issue when accessed from external n/w :

everytime an entry from a drop-down is selected from an Ajax enabled control, instead of the fields populating, the page gets refreshed and the content of the box are cleared.

Also, clicking on other items that normally hyperlink to other pages, results in nothing happening.

Upon investigation, we realized that :

Everytime it fails, a string - "&AuthResend" followed by an alpha numeric string is attached, which attempts to authenticate the user's credentials everytime a request is made to the server.

ISA error logs yielded the following error msg :

"12210 Internet Server API ( ISAPI ) has finished handling the request. Contact your system administrator. "

This behavior is inconsistent except when accessed from Google Chrome, where it fails each time.

We have applied all the recommended hot fixes from Microsoft's KB pages.

View 1 Replies

Web Forms :: Sending Scheduled EMail From Web Application As External Service?

Dec 27, 2010

As indicated in the Subject, I have a web application (say APP) that should feature an e-Mail Notification Service (ENS). Activation of the Service is controlled by a Button in a dedicated page where some parameters are also included to set running Period (FromTime - ToTime), Interval, Recipients, etc.

When said button is clicked, it should maintain those parameters into database then launch ENS. Since ENS is expected to run for good according to set parameters, it logically should run as an external application/service, independent from APP.

When ENS starts, it needs to consult database to fetch parameters, then schedules its Timer to periodically check database for some transactions that when found, should trigger ENS to dispatch e-Mails to concerned Recipient(s).


1. Launch ENS as an external application on button click from APP.Achieved by using System.Diagnostics.Process class. However, I encountered a problem in verifying if the process is already running before starting it. The root of the problem lies in
ProcessName property. Since ALL web applications must be launched via IE, hence, have
iexplore as their ProcessName, which is also applicable to all processes started through IE, it is very likely to have multiple processes utilising IE. How to check which is which? I couldn't figure out that.

Eventually, I ended up with a workaround: when the Process is started from APP, capture its ID and save it to database, then use this ID with GetProcessById() method for later verification. When the Process is terminated, reset stored ID in database.

2. What sort of application should ENS be: Windows Application or Web Application?

In either way however, ENS will always run invisible in the background being a Process. If this is the case, how about creating it as a Windows Service instead?

I did a lot of reading but still confused. However, the choice is limited now to either Web Application or Windows Service. Which one is more convenient to the task in hand?

3. What Timer to use?

I tried System.Timers.Timer in a test web application but it didn't fire! Then I used ASP AJAX Timer and it worked pretty well (I still need though to try running it from APP to judge its functionality). I came across some recommendations to use System.Threading.Timer but haven't tested that yet. Would it worth the trial?

4. ENS as a Windows Service.

If I create ENS as a Windows Service, would I be able to communicate with database? How would this influence the Timer to use?

View 4 Replies

Iis7 - External References Slow Down Application (VS: Add Reference Dialog)?

Aug 6, 2010

I've noticed as my website gets bigger and bigger, the time my laptop takes to display my page is much longer then say a new projects with minimal references. I think there are two variables at play that affect ASP.NET warm-up time:

The quantity of external references The time it takes for a worker process to new() up each instance per worker process Additional time for the WCF objects as the ServiceHost may be in an external DLL First, are those the correct variables to take into account when considering ASP.NET startup time? Next, it appears that web.config may dispatch other objects for use with certain filetypes (*.svc, *.aspx, Windows Identity Foundation (WIF), etc. ). This too may cause delays in ASP.NET.

Last, my project is created as a "web project" not a "web site". Not sure if this has an impact. Is my theory full of holes, or is there something I can do to make development on a old laptop any better?

View 1 Replies

C# - How To Integrate Sharepoint Document Into Web Application And Adding Credentials For External Users

Sep 9, 2010

Being new to integrating sharepoint documents into web applications I am struggling with the following task, so anyI have a page in my web application that needs to display a document from sharepoint.I use the appropiate sharepoint web service to get a list of all the documents in the sharepoint list, I then pick out the one I would like to retrieve and get the path to the document so i would end up with something like:

Within our network I can do following:
"src"] = ConfigurationManager.AppSettings["SharepointUrl"] + _filePath;

This would display the document in iframe... problem I have is coming from outside the network the sharepoint site can't be accessed (due to firewalls etc). We do have a vpn back to our network on the external server our web application sits on. If i was to use the document url in a browser on the server I am prompted for credentials and then get to view the document.Is there a way for the web application to use the vpn, use credentials i give (e.g through impersonation) to access the document and display it to exernal clients?

View 2 Replies

Launch An External Application From The Browsers (IE, Firefox, Chrome, Safari) In Windows?

Jun 19, 2010

Is it possible to embed an external application inside the browser (IE, Chrome, Safari, Firefox) so it will look like a native web application but actually having access to the USB ports of the client machine? I have heard that I need to make an ActiveX control. I would like to use the .Net framework, but if that is not possible, maybe using Java or C++ will be fine.

I have to make an application that will allow to the users to connect an external device to an USB port, this device will take a backup of the information contained in a SIM card and send it to the user's account online agenda. So the user can restore it later using the same application. This should be a web application or at least look like one.

If the first is not possible. Is there any way to launch an external application from all the browsers, and then pass information to the browser window to allow it to refresh after the backup has been made?

View 1 Replies

Elect One Web Application Instance To Perform A Task Triggered By An External Event?

Mar 4, 2010

I have an ASP.NET application running on multiple IIS6 web servers, with a SQL Server 2005 database back-end.

I need to:

monitor the database for the completion of an external job event, and then have exactly one web application instance submit some information to a web service For (1) it seems like a SqlDependency would be the best approach (or just plain old polling). Each web application instance would register such a dependency when it starts up. (I don't want to configure a 'master' instance because the failure of that instance would mean the task doesn't proceed, even if other instances are available. Thus my design is to ensure that if there is an instance available to do the work, then the work ought to proceed.)

For (2) I have been thinking of having some sort of flag in the database that the web application instances try to update once they receive the SqlDependency notification in (1), along the following line (greatly simplified):

UPDATE StatusTable SET TaskStatus = 1 WHERE TaskStatus = 0


that only one application instance would have been able to update the TaskStatus, and thus only one instance would have a @@ROWCOUNT > 0. This would then be the instance 'elected' to submit the information to the web service.

View 1 Replies

Copyrights 2005-15, All rights reserved