Posts

File being used by another process

hello, i have multi-threaded program several threads can call static method in static class. code use follows: string connection = null; lock (threadlock) { streamreader sr = null; try { sr = new streamreader(path); connection = sr.readtoend(); sr.close(); sr.dispose(); } catch (exception e) { debug.writeline("there exception accessing file " + path + ":" + e.message); debug.writeline(e.stacktrace); sr.close(); } } the problem streamreader not seem closing file. following exception: a first chance exception of type 'system.io.ioexception' occurred in mscorlib.dll there exception accessing file c:\test installa...

DSC for Linux nxGroup Resource Property PreferredGroupID not working

hello, a small background, i'm working in unix/linux world 20 years, since couple of weeks i'm trying familiar azure in special linux part of virtual machines in azure. personal microsoft experience is, lets say, "poor". i've made start desired state config (dsc) linux able provision linux systems in azure. i've prepared desktop to able load nx module. setup: downloaded , installed psdscforlinuxsetup.msi microsoft http://www.microsoft.com/en-us/download/details.aspx?id=49150 this msi contains nx module , rpm's installed onto unix host. on linux (oracle linux 7 vm) i've installed dsc-1.1.0-466.ssl_100.x64.rpm , omi-1.0.8.ssl_100.x64.rpm, far good. powershell access vm working fine. the issue: the nx module contains resource called nxgroup, resource able manage unix groups within vm. 1 of properties preferredgroupid. looks property not working @ all, @ least think is. when running omiserver in debug mode see powershell se...

Get File Info

hello, i saving, in sql table, files of various types: image/jpeg, image/gif, application/pdf, audio/mpeg, text/css, text/plain, etc.   later retrieving files database. i need stream following properties: 1 - mime type. 2 - length. 3 - height , width if file image.   is possible? or need save info in database?   thank you, miguel i save these individually, make things easier on you. have these columns {filename, file, filelength, filedimensions} john grove, mcc - senior software engineer Visual Studio Languages  ,  .NET Framework  >  Visual C# ...

Refresh Site Cache problem

  hi, i have unpacked csharpsite , followed(exactly) installation guide in creating of users, application pools etc. when try url, http://192.168.1.6/orderswebservice/sitecacherefresh.axd?cachetorefresh=catalogcache , works but http://192.168.1.6/lizardprice/sitecacherefresh.axd?cachetorefresh=catalogcache  does not work and also when try "refresh site cache" inside of catalog manager, doesn't work either.   if marketingwebservice has anonymous access can open marketing application can not operations inside.. if try windows or basic authentication not able open marketing manager application   we tried lots of hotfix too.   the configuration follows...   the csharpsite (lizardprice) runs under "anonymous access" (tried different users) the catalogwebservice - anonymous access - catalogwebsvc  account the orderswebservice - basic authentication - orderswebsvc  account the profileswebservice - basic authentication- profiles...

How to get “Single Reference” soap body

Image
we have developed web service using soaprpcmethod. expecting “single reference” soap envelop client request. but sample envelop generated web service is  “multi-reference” .   please suggest us, need done web service can accept “single reference” soap request , process it.   the signature of web service is:   [soaprpcservice]       public class service1 : system.web.services.webservice       {             [webmethod]             [soaprpcmethod]             public soapresult mywebmethod(soaprequest objrequest)             {                   //some code....                   soapresult objresult= new soapresult();                   //some code....                   return objresult;             }                   }       public class soapresult       {             public string username;             public child_1 objchild_1;         }       public class soaprequest       {             public child_1 objchild_1;   ...

Database insertion using msmq

hi all, i have requrirement consuming web service , developing application in biztalk here using both sides two-way ports, now issuse want store request , response messages in sql database, which better way please give me suggetions. thanks & regards, premsagar i want store data in own table in db. this biztalk tracking is exactly. https://msdn.microsoft.com/en-us/library/aa560149.aspx?f=255&mspperror=-2147217396 storing data outside app without specific requirement bad idea since introduces compliance , operational problems outweigh benefit. it (the archive component) can ok in dev if use dev specific pipeline. BizTalk Server  >  BizTalk Server General

Cannot implicitly convert type 'string' to 'bool'

hi, 1 of assignments have create simple 'safe' program user enters combination , can test key using unlock safe e.t.c. i want element of code determine happens if user enters correct combination if ( keyentry.text = str_safe_combo); //if combination entered textbox matches combination entered user backcolor = color.green; //changes background colour of form green safestatus.backcolor = color.lawngreen; //changes background colour of safe status text box light green keyentry.backcolor = color.lawngreen; //changes background colour of text box user tests combination light green btn_test.text = ("lock"); //changes text of test key button says 'lock' btn_test.backcolor = color.pink; //changes backgroud colour of text key button pink the code have highlighted offending code. any ideas need change? thanks guys :) you must use == operator in if statement regards...