hello everybody
Maybe there will be someone who solved the same problem.
i have application in C# (FW4) which uploads files to the SQL server using filestreams (snippet of code below). When this aplication is connected to the SQL Server 2012 running on Windows Server 2008R2 it works correct. But when I try do the same on another instance of MSSQL running on Windows 2012 the application failed with exception when instance of SqlFileStream object is created.
System.ComponentModel.Win32Exception was caught HResult=-2147467259 Message=The request is not supported Source=System.Data ErrorCode=-2147467259 NativeErrorCode=50
Both installations of SQL server has the same parameters, filestream is enabled with full access level. Difference is on WIndows Server version and working instance does not have SP1 installed.
Do you have any idea? some privileges or exceptions on firewall ... anything?
thanks for all hints
Matej
using (TransactionScope tran = MetaDataHelper.CreateTransactionScope()) { if (string.IsNullOrEmpty(pathName)) { string sql = "SELECT Data.PathName() FROM " + EntityTableName + " WHERE AttachmentID=@id;"; pathName = Convert.ToString(MetaDataHelper.ExecScalar(sql, BaseEntity.MetaDataHelper.GetParam("@id", this.ID))); } byte[] tranContext = (byte[])MetaDataHelper.ExecScalar("SELECT GET_FILESTREAM_TRANSACTION_CONTEXT()"); using (SqlFileStream fileStream = new SqlFileStream(pathName, tranContext, FileAccess.ReadWrite)) { filestreamMethod(fileStream); fileStream.Close(); } tran.Commit(); }