Endpoint Error DbConnectionStringBuilder netstandard

  • 18Views
  • Last Post 2 days ago
0
votes
don schlichting posted this 4 days ago

Hello,

Im creating my first aspx end point page following https://docs.skyvia.com/connect/sql-endpoints/ado.net-provider.html   But I'm always getting two errors and two warnings (pic attached)   .  NuGet install was fine, no errors.

 Errors Below,  Web config at very botom.

Thanks!!

Don

 

Severity Code Description Project File Line Suppression State

Error CS0012 The type 'DbConnectionStringBuilder' is defined in an assembly that is not referenced. You must add a reference to assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. 1_OpenOrders.aspx C:\Dons\Exceed3\OpenOrders.aspx.cs 26 Active

 

Severity Code Description Project File Line Suppression State

Error CS1061 'SkyviaConnectConnectionStringBuilder' does not contain a definition for 'ConnectionString' and no accessible extension method 'ConnectionString' accepting a first argument of type 'SkyviaConnectConnectionStringBuilder' could be found (are you missing a using directive or an assembly reference?) 1_OpenOrders.aspx C:\Dons\Exceed3\OpenOrders.aspx.cs 26 Active

 

Severity Code Description Project File Line Suppression State

WarningAssuming assembly reference 'Devart.Data, Version=5.0.2393.0, Culture=neutral, PublicKeyToken=09af7300eec23701' matches 'Devart.Data, Version=5.0.2458.0, Culture=neutral, PublicKeyToken=09af7300eec23701', you may need to supply runtime policy

 

Severity Code Description Project File Line Suppression State

Warning CS1702 Assuming assembly reference 'Devart.Data, Version=5.0.2393.0, Culture=neutral, PublicKeyToken=09af7300eec23701' used by 'Devart.Data.SqlShim' matches identity 'Devart.Data, Version=5.0.2458.0, Culture=neutral, PublicKeyToken=09af7300eec23701' of 'Devart.Data', you may need to supply runtime policy 1_OpenOrders.aspx C:\Dons\Exceed3\OpenOrders.aspx.cs 26 Active

 

WEB CONFIG

---

<?xml version="1.0" encoding="utf-8"?>

<!--

  For more information on how to configure your ASP.NET application, please visit

  https://go.microsoft.com/fwlink/?LinkId=169433

  -->

<configuration>

  <appSettings>

    <add key="dbKits2" value="server=gtinfo5; database=Kits2; uid=WebApps5; pwd=NowBake20160527!" />

  

    <add key="dbP21" value="server=p21sql; database=p21; uid=WebApps5; pwd=NowBake20160527!" />

 

  </appSettings>

  <connectionStrings>

    

  </connectionStrings>

  <system.web>

    <compilation debug="true" targetFramework="4.7">

      <assemblies>

        <add assembly="System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

        <add assembly="System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

      </assemblies>

    </compilation>

    <httpRuntime targetFramework="4.7" />

    <customErrors mode="Off" />

  </system.web>

<system.webServer>

    <handlers>

      <remove name="ExtensionlessUrlHandler-Integrated-4.0" />

      <remove name="OPTIONSVerbHandler" />

      <remove name="TRACEVerbHandler" />

      <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />

    </handlers>

  </system.webServer><system.data> 

    <DbProviderFactories> 

      <add name="dotConnect for SkyviaConnect" invariant="Devart.Data.SkyviaConnect" description="Devart dotConnect for SkyviaConnect" type="Devart.Data.SkyviaConnect.SkyviaConnect ProviderFactory, Devart.Data.SkyviaConnect, Version=Version=1.0.14.0, Culture=neutral, PublicKeyToken=09af7300eec23701" />

    </DbProviderFactories> 

  </system.data>

  <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

      <dependentAssembly>

        <assemblyIdentity name="Devart.Data" publicKeyToken="09af7300eec23701" culture="neutral" />

        <bindingRedirect oldVersion="0.0.0.0-5.0.2458.0" newVersion="5.0.2458.0" />

      </dependentAssembly>

    </assemblyBinding>

  </runtime>

</configuration>

___

 

Thanks!

Don 

Attached Files

Order By: Standard | Newest | Votes
0
votes
Dmitriy Muzurov posted this 3 days ago

Hello Don,

Thank you for submitting a ticket with us.

The endpoint from our documentation is an example and can't be used for connection.

This endpoint is specified in your code. Please change it to your actual SQL endpoint, created in Skyvia Connect, include actual login credentials and try again.

We are looking forward to hearing from you, should you have any questions.

0
votes
don schlichting posted this 3 days ago

Yea, i know. the error has nothing to do with the values.  The error is saying ConnectionString is not valid for connectionStringBuilder

 

 

Severity Code Description Project File Line Suppression State

Error CS1061 'SkyviaConnectConnectionStringBuilder' does not contain a definition for 'ConnectionString' and no accessible extension method 'ConnectionString' accepting a first argument of type 'SkyviaConnectConnectionStringBuilder' could be found (are you missing a using directive or an assembly reference?) 1_OpenOrders.aspx C:\Dons\Exceed3\OpenOrders.aspx.cs 26 Active

 

0
votes
don schlichting posted this 3 days ago

All the DLLs and using statemens seem correct.  Pic attached

0
votes
Dmitriy Muzurov posted this 2 days ago

Dear Don,

Thank you for details.

Please create a new test project in your Visual Studio: File > New > Project > ASP.NET Web Application (.NET Framework) C#, choose Empty.

Add a new *.aspx page and place our code from the tutorial to the Page_Load event handler, add "using Devart.Data.SkyviaConnect;" in the beginning of the code file.

Then, navigate to Tools > NuGet Package Manager > Package Manager Console and execute:

Install-Package Devart.Data.SkyviaConnect

After this, your project should be compiled successfully.

Close