Pooja Solanki
asked on
out of string space error
i have changed an old windows application made in VB to website in c#.Both are referring a same vb dll code.for that particular dll code, Both the applications show sometimes the out of string space error and we are fine with that. But the freqency of out of string space error is very high for website comparatively of windows application. This code generates a report. so it first write the data from database into an xml file and then generates a word file. while writing that xml,this error comes.
I have checked for the same object ,in windows application it took 6-7hours but finally it gives the report. While in website in around 1 hour it gives out of string space error.
What cold be the reason ?
I have checked for the same object ,in windows application it took 6-7hours but finally it gives the report. While in website in around 1 hour it gives out of string space error.
What cold be the reason ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i just want to know why is the same code behaving differently in windows application and web application?
for a same object ,In windows it is generating the report in 6 hours but in website it is giving the out of string error in around 1 hour?.
for a same object ,In windows it is generating the report in 6 hours but in website it is giving the out of string error in around 1 hour?.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
reason might be inside that dll you mention, string concatenation in loops is a common memory hog, depending on how are you building your xml file, try to do it in smaller chunks, by line, it would be better if you show us that part of code that does the string manipulation so we can give you proper advice.
Also server migth have concurrent users or other apps/processes running, eating more memory than your windows app.
Also server migth have concurrent users or other apps/processes running, eating more memory than your windows app.
ASKER
i have optimized the website by writing a new code that directly take data from db one by one and write to xml,it just generates the report in seconds for even large datas. But i am supposed to give the reason why is it giving that error in the report for website i have made with the same code funtionality and generating the report in windows application for the same object.
Note: At times we have seen this string out of space error even in the windows application . But in this particular case, why is the report generating in the windows application and giving the error in website . Or why is the error more frequent in website ?
Note: At times we have seen this string out of space error even in the windows application . But in this particular case, why is the report generating in the windows application and giving the error in website . Or why is the error more frequent in website ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
helped a lot.Thanks:)
Open in new window