Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. error occurred while enabling mars for this connection

error occurred while enabling mars for this connection

Scheduled Pinned Locked Moved Database
databasecsharpasp-netsql-serverdotnet
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    Travelthrprog
    wrote on last edited by
    #1

    Hi, I have an asp.net application and using connection string to connect to database. But I am getting below error. Connection open and login was successful, but then an error occurred while enabling MARS for this connection. (provider: Name Pipes Provider, error:15- Function not supported) I am using Asp.net framework 4.5 and SQl server 2012 DataTable dt = new DataTable(); SqlConnection objcon = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["test"].ToString()); using (var command = new SqlCommand("SELECT * FROM testData", objcon)) { var formCollection = new List<Form>(); try { objcon.Open(); command.CommandTimeout = 3000; var res = command.ExecuteReader(); objcon.Close(); lblID.Text ="Success"; } catch (Exception ex) { objcon.Close(); lblID.Text = ex.Message; } }

    L 1 Reply Last reply
    0
    • T Travelthrprog

      Hi, I have an asp.net application and using connection string to connect to database. But I am getting below error. Connection open and login was successful, but then an error occurred while enabling MARS for this connection. (provider: Name Pipes Provider, error:15- Function not supported) I am using Asp.net framework 4.5 and SQl server 2012 DataTable dt = new DataTable(); SqlConnection objcon = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["test"].ToString()); using (var command = new SqlCommand("SELECT * FROM testData", objcon)) { var formCollection = new List<Form>(); try { objcon.Open(); command.CommandTimeout = 3000; var res = command.ExecuteReader(); objcon.Close(); lblID.Text ="Success"; } catch (Exception ex) { objcon.Close(); lblID.Text = ex.Message; } }

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I'd guess you're enabling MARS in your connection-string, and the server somehow refuses to enable it. If you are not using an Express-edition, I'd recommend checking if the feature is installed and turned on.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^][](X-Clacks-Overhead: GNU Terry Pratchett)

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups