[Mono-bugs] [Bug 81490][Wis] New - SqlDataSource doesn't respect ProviderName

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Apr 29 23:18:47 EDT 2007


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by jrwren at gmail.com.

http://bugzilla.ximian.com/show_bug.cgi?id=81490

--- shadow/81490	2007-04-29 23:18:47.000000000 -0400
+++ shadow/81490.tmp.25718	2007-04-29 23:18:47.000000000 -0400
@@ -0,0 +1,104 @@
+Bug#: 81490
+Product: Mono: Class Libraries
+Version: 1.2
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: Sys.Web
+AssignedTo: mhabersack at novell.com                            
+ReportedBy: jrwren at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SqlDataSource doesn't respect ProviderName
+
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+SqlDataSource doesn't respect ProviderName
+
+Steps to reproduce the problem:
+Run the following ASPX:
+
+web.config:
+
+<?xml version="1.0"?>
+<configuration>
+  <connectionStrings>
+    <add name="NpgsqlConnectionString"
+connectionString="server=localhost;user
+id=jrwren;Password=danny;database=test" providerName="Npgsql" />
+  </connectionStrings>
+
+  <system.data>
+    <DbProviderFactories>
+      <add name="Npgsql Data Provider" invariant="Npgsql" support="FF"
+description=".Net Framework Data Provider for Postgresql Server"
+type="Npgsql.NpgsqlFactory, Npgsql, Version=1.0.0.0, Culture=neutral,
+PublicKeyToken=5d8b90d52f46fda7" />
+
+    </DbProviderFactories>
+  </system.data>
+
+
+Default.aspx
+
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs"
+Inherits="NpgsqlAndSqlDataSource._Default" %>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head runat="server">
+    <title>Npgsql with SqlDataSource Example Page</title>
+</head>
+<body>
+    <form id="form1" runat="server">
+
+        <asp:SqlDataSource ID="SqlDataSource1" runat="server"
+ConnectionString="<%$ ConnectionStrings:NpgsqlConnectionString %>"
+ProviderName="<%$ ConnectionStrings:Npg
+sqlConnectionString.ProviderName %>"
+            SelectCommand='select id,name,zipcode from
+"Test"'></asp:SqlDataSource>
+
+         <asp:GridView ID="GridView1" runat="server"
+DataSourceID="SqlDataSource1"  >
+        </asp:GridView>
+
+    </form>
+</body>
+</html>
+
+Default.aspx.cs:  not required.
+
+
+Actual Results:
+
+System.Net.Sockets.SocketException: Connection refused
+  at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remote_end)
+[0x00000] 
+  at Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource, Int32
+port, Int32 packetSize, Int32 timeout, TdsVersion td
+
+
+Expected Results:
+
+GridView output from the Postgresql database.
+
+
+How often does this happen? 
+
+every time.
+
+
+Additional Information:
+
+I may have this categorized wrong. The problem could be with the Connection
+String support. I looked at SqlDataSource.cs and I did not see a problem,
+but I do not know ASP.NET well enough.


More information about the mono-bugs mailing list