How do I create a text file and write the contents of a string to it? I plan to reference to the text file later. It could be on the server (root folder) or anywhere where I can reference it. Below is the string contents
foreach (string s in strValuesToSearch)
{
if (result.Contains(s))
result = result.Replace(s, stringToReplace);
How can i Make A Text File In Memory(Ram -> Save NoWhere) And Write Something On It And Open NotePad on top of Client browser And Open That Text File In It And Let the user save it by him/her self? -> in code behind
Currently we are saving files (PDF, DOC) into the database as BLOB fields. I would like to be able to retrieve the raw text of the file to be able to manipulate it for hit-highlighting and other functions.Does anyone know of a simple way to either parse out the files and save the raw text on save, either via SQL or .net code. I have found that Adobe has a filtdump utility that will convert the PDF to text. Filtdump seems to be a command line tool, and i don't see a way to use a file stream. And what would the extractor be for Office documents and other file types?-or-Is there a way to pull out the raw text from the SQL Full text index, without using 3rd party filters?Note i am trying to build a .net & MSSql solution without having to use a third party tool such as Lucene
I have a memory leak somewhere that I cant find. Every few days my server will crash, and just before that I log a ton of SQL errors stating that it is "out of memory".
I cant find it anywhere, all of my connections are being disposed like so:
[Code].... Then I call the connection from my pages like so:[Code]....
That is all pretty straight forward. The connection is disposed because it is implementing the USING clause. I am opening the connection in my connection manager class, and not where it is being utilized?Or, could the problem be in the below method I am using to populate a SqlDataReader:[Code]....
Now, at first it appears as though this could be the problem because the Connection isn't part of a USING clause, however doesn't the 'Data.CommandBehavior.CloseConnection' pretty much do the same thing. This makes sure that the connection is closed when the reader is closed, right? Here is how I call that above reader from my login page code behind:[Code]....
So the DataReader will get closed even without the .Close() because it is in the USING, and the connection should get closed because I specified it in the ExecuteReader paramters right?
how to read the data's in the text file using sql server 2000 and 2008. i have a text file in a server and it contains one column name with the multiple column values i need to read that informations and i need to update in a table in the database.
I want my cookie to disappear when the user closes their brower-- I've already set some promising looking properties, but my cookies pop back to live even after closing the entire browser.
HttpCookie cookie = new HttpCookie("mycookie", "abc"); cookie.HttpOnly = true; //Seems to only affect script access cookie.Secure = true; //Seems to affect only https transport
What property or method call am I missing to achieve an in memory cookie?
I am building an asp.net application, using II6 on windows server 2003 (vps hosting).
I am confronted with an error I didn't receive on my development machine (windows 7, iis 7.5, 64 bit).
When my wcf service tries launching my query running against a local sql server this is the error I receive:
Memory gates checking failed because the free memory (43732992 bytes) is less than 5% of total memory. As a result, the service will not be available for incoming requests. To resolve this, either reduce the load on the machine or adjust the value of minFreeMemoryPercentageToActivateService on the serviceHostingEnvironment config element.
I have both VS 2005 and 2008 installed on my machine. 2005 is fine. For 2008, literally any asp.net project I try to create gets this eror. I try stepping into the code, and the error occurs apparently before anything that I can trap is loaded. There is no information written to the event log. I have tried this with a "Hello World" webpage with nothing else going on. Seems unique to my Windows Server 2003 machine.
I am getting a weird error in asp.net while using leadtools imaging api. Here's the stack trace.
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at SetThreadData(_THREADDATA* ) at Leadtools.Codecs.CodecsOptions.Use() at Leadtools.Codecs.RasterCodecs.DoSave(SaveParams saveParams) at Leadtools.Codecs.RasterCodecs.Save(RasterImage image, Stream stream, RasterImageFormat format, Int32 bitsPerPixel)........
I am maintaining C# .NET code written by somebody else, I get following exception few times,Attempted to read or write protected memory. This is often an indication that other memory is corruptThe code structure where I get the above exception is somethign like this,- it is using ref variables in following sequence,Variable-1 and variable-2 are local variables in App1, - App1: func1() which passes these variables reference to func2(), - App1: func2() passes same variables reference via .net remoting to another application (App2).-App2: does the same passes same received reference to another call 2 times.- The execption is occured while returning from App2.
(App1:func1(ref Var1, ref Var2) --> App1:func2(ref Var1, ref Var2) <---App1 .net remoting to App2--> App2:func3(ref Var1, ref Var2)--> App2:func4(ref Var1, ref Var2)-->variables getting updated and function returned to original caller)
My doubts are ,1. Is passing reference variables in such chain is correct? will it cause such exeption? Does .net support ref variable call directly?
I have a web site that is hosted by Network Solutions. The hosting package I have includes support for ASP. I can place a simple aspx page on my web site and point to it with my browser and it appears to execute. What I'd like to do is reference a text file (for parsing) that is in the same folder as the aspx file. I have no idea what the absolute path is to the folder. How can I reference the file for reading if I don't know the absolute path?
I am unable to connect to my local instance of SQL Server 2008 Express using SQL Server Management Studio.I believe the problem is related to a change I made to the connection protocols. Before the error occurred, I had Shared Memory enabled and Named Pipes and TCP/IP disabled. I then enabled both Named Pipes and TCP/IP, and this is when I started experiencing the problem.
I have now set Named Pipes and TCP/IP back to disabled. When I try to connect to the server with SSMS (with either my SQL server sysadmin login or with windows authentication), I get the following error message:
"A connection was successfully established with the server, but then an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)"
My first question here is: why is it returning a Named Pipes error? Why isn't it using Shared Memory? It seems like it is not listening on Shared Memory for some reason?When I set Named Pipes to enabled and try to connect, I get the same error message.My windows account is does not have administrator priviliges on my computer.
How do I read/write a text file on another server from a web page.I get the error "Access to the path '//Server2/mydatafiles/test.txt' is denied". I do not get the error if I am running the browser on the server where the files exist.I think I need to set permissions on the destination server in some way.