|
Ah, just looked like you did.
is this being done in < .NET 2.0?
|
|
|
|
|
Yes .Net 2, i tried to convert and compile it with .net 3 but same thing happened.
|
|
|
|
|
Are you using the old xmlreader and xmlwriter?
If not then why do you "open, read, close" then "open, write, close" ?
|
|
|
|
|
I'm using the xmlDocument Class. When i want to save with xmlDocument.save() that error happens
|
|
|
|
|
Im willing to bet that you've not disposed properly of the stream when you open the file, hence when you come to write it there is already another process holding onto it (ie, your own program from earlier on during the read op)
|
|
|
|
|
Thats not the case, because it does not happen at all if i don't open the explorer and look into that folder.
|
|
|
|
|
once you call the load() method the file should no longer be accessed...
Again I don't see why you "open, load, close" then "open, write, close"
You should be fine with it in ram after you load it. "open, load" do your other stuff "append new data, close"
|
|
|
|
|
I tried it. But it doesn't have an effect.
Here is my code at the moment:
XmlDocument doc = new XmlDocument();
doc.Load(FullFilePath);
.......
doc.Save(FullFilePath);
|
|
|
|
|
Does it error if you try to write to a different file path? (one you know you have write access to)
|
|
|
|
|
Hi,
if you want write or delete access (anything other than read access) to a file
that just got created (by yourself or someone else, does not matter),
chances are you will find the file is being accessed by some other process,
and your access is not granted.
Yhe other process very likely is some server code that is there to assist you
somehow. Candidates are:
- anti-virus software (Norton, McAfee, whatever)
- indexing software (Google Desktop, MS Office, whatever)
The common thing is these packages are looking all the time for new files, so
they can inspect them.
Microsoft is aware of the consequences; Windows Explorer will try rename and
delete attempts up to five times (with one second interval), and only reports
failure if the action continues to fail for that time.
The solution:
1. either use a different file name
2. or remove all background reader candidates (bad idea)
3. or implement the retry loop as Explorer has it (use a Windows.Forms.Timer
for this)
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thank you very much.
Luc Pattyn wrote: The solution:
1. either use a different file name
2. or remove all background reader candidates (bad idea)
3. or implement the retry loop as Explorer has it (use a Windows.Forms.Timer
for this)
1. and 2. are no solutions for me.
I have to try 3. I think. I hoped i don't have to use a timer
|
|
|
|
|
hello everyone...
my problem is that there are some people who will only use asp.net page to chat. a group of people will chat those asp.net chatters from windows application. i mean how can i acvhieve this chat between c# and asp.net. can anyone help please
|
|
|
|
|
_beginner_ wrote: i mean how can i acvhieve this chat between c# and asp.net
ASP.NET is a framework. C# is a language that can be used to write ASP.NET applications. Are you asking how to communicate between the ASPX page and the code behind?
If not then you really need to explain better because I don't understand what you are asking.
|
|
|
|
|
the problem is this. some people must use aspx web page to chat. and some people must use a windows application like msn messenger. for exmple, i will use msn messenger to chat with you, and you must use an aspx web page to chat with me. maybe this is more clear
|
|
|
|
|
It can be done, and the general practice is to have a central server with 2 types of client:
web: pings for new messages (possibly using AJAX)
windows: gets messages pushed to it from server.
Start with an example of a straight windows forms chat application - there will be plenty online - and build the web client when you are more knowledgable on cthe chat software.
|
|
|
|
|
how windows app users know that there is a messge from web app users same problem for web users..
someone advice me to use socket programming. is it posible.
|
|
|
|
|
At the moment how does one windows app user know there is a message from another windows app user?
|
|
|
|
|
chat only will be done between aspx and win app. Not aspx to aspx or not win to win. only aspx to win or win to aspx
|
|
|
|
|
J4amieC answered this
If you are using SQL Server on the backend, look at SQLNotification
only two letters away from being an asset
|
|
|
|
|
i will use sql. what is sqlnotification. sth like catching sql triggers. can you explain a littler please
|
|
|
|
|
Do some research first, then ask questions
only two letters away from being an asset
|
|
|
|
|
i mke research and found some simple applications. but i have problem in aspx. when sqldepndecy.start(myconnString) code line is debug it takes to much time. i have a page to choose the person to chat. when i chose person and click ok button normally i go to chat with te code redirect("chat.aspx"). but it takes to much time and doesnt redirect me chat page. becaues in chat page load event sqldependecy.start(myconstrin) takes to much time. is there any setting to enable sth work sqldependc. for exmple we must enable service broker in sql. in asp.net is there any setting
|
|
|
|
|
i'm using sql server and sql server authentication to log the users , when the application connecting the db connection string carries the password and the username , what i want to do is encrypt the connection string when connecting the db ,
COULD you tell me how to do this ......
|
|
|
|
|
Try this one.
If that doesn't work, you should search Google like I did for that link.
Hogan
|
|
|
|
|