.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> .Net Framework >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Using UDL Files

Posted By:Shashi Ray       Posted Date: November 25, 2009    Points: 25    Category: .Net Framework    URL: http://www.dotnetspark.com  
 

 

Using UDL Files

The OLE DB .NET Data Provider supports Universal Data Link (UDL) file names in its connection string. You can pass the connection string by using construction arguments to the OleDbConnection object, or you can set the connection string by using the object's ConnectionString property.

Note   The SQL Server .NET Data Provider does not support UDL files in its connection string. Therefore, this approach is available to you only if you are using the OLE DB .NET Data Provider.

For the OLE DB provider, to reference a UDL file with the connection string, use "File Name=name.udl."

Advantages

  • Standard approach. You might already be using UDL files for connection string management.

Disadvantages

  • Performance. Connection strings that contain UDLs are read and parsed each time the connection is opened.
  • Security. UDL files are stored as plain text. You can secure these files by using NTFS file permissions, but doing so raises the same issues as with .config files.
  • SqlClient does not support UDL files. This approach is not supported by the SQL Server .NET Data Provider, which you use to access SQL Server 7.0 and later.

More Information

  • To support administration, make sure that administrators have read/write access to the UDL file and that the identity used to run your application has read access. For ASP.NET Web applications, the application worker process runs by using the SYSTEM account by default, although you can override this by using the <processModel> element of the machine-wide configuration file (Machine.config). You can also impersonate, optionally with a nominated account, by using the <identity> element of the Web.config file.
  • For Web applications, make sure that you do not place the UDL file in a virtual directory, which would make the file downloadable over the Web.

 

 

Shashi Ray


 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend