Hi, same data gets sent (flushed), but .End() will end the entire thread. So no code will be executed after I called .End()
Discussions
-
-
Hi all!
I need to send an accepted response to the client. However, I need to send only the specific data and not all the extra html page data.
Currently my code behind looks like this:
Response.Write("<CallBackResponse>Accepted</CallBackResponse>");
Response.Flush();This however sends a response that looks like this: (I only want the portion in bold to be sent.)
<CallBackResponse>Accepted</CallBackResponse> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head><title> Payment Approved </title><link href="style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> #makePayment { width: 247px; } body { font-family : Calibri; } </style> </head> <body> <form name="form1" method="post" action="BookSave.aspx" id="form1" style="width:100%; height:100%; text-align:center;"> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTEzOTM0ODg4MzMPZBYCAgMPZBYCAgEPZBYCAgUPZBYEAgMPDxYCHgRUZXh0BRM5NDIzMTIxMjEzMTU0NjE4OTM3ZGQCCw9kFgxmD2QWAgIBD2QWAgIDDw8WAh8ABQczNjAwLjAwZGQCAQ9kFgICAQ9kFgICAQ8PFgIfAAUEVmlzYWRkAgIPZBYCAgEPZBYCAgEPDxYCHwAFD0RlcG9zaXQgUGF5bWVudGRkAgMPZBYCAgEPZBYCAgEPDxYCHwAFCk5SIHZhbiBXeWt
Any ideas on how to accomplish this?
Thanks in advance!
-
Hey, I got it working, was very close to your example:
ArrayList nets = new ArrayList(); DirectoryEntry entryPC; entryPC = new DirectoryEntry(); entryPC.Path = "WinNT://domainName"; foreach (DirectoryEntry child in entryPC.Children) { if (child.Name != "Schema") nets.Add(child.Name); } return nets;(obviously using
System.DirectoryServices)Thanks!
-
@xgamer: hey, I've found a lot of entries similar to what you've just given me, but none of them return anything. What I assume is, is that for this code to work, I need a domain set up, but I'm trying to get the computer names in a normal workgroup.
I've tried your code * well, but no luck.

-
How do I get all the Computer names (or details) on a local network or on the same workgroup via C#? I've Googled all over the place and have found nothing that works! Thanks in advance!

-
W3bbo said:
You're doing sometihng wrong. The appearance/style of data is independent of content, unless things like colour convey some kind of meaningful information, in which case that information should be in the document XHTML (ideally in a style="" attribute) and not the common stylesheet.
no, I wanted to load the information from a seperate C# class that is initiated in code behind. It's ok though, I just set the values in code behind (server side) directly to the elements I want effected. Each venue that uses our BookNow pages can specify their own color theme.
-
lesmemphis said:W3bbo said:*snip*
It seems the problem was to do with sessions. Sometimes when I call a variable in a session it returns a null, but if I just call it again, it returns the value. So now I just build a check in. Haven't had the problem since. Still holding fingers crossed that it won't happen again.
Well, it seems my problem is STILL not solved. Wow, this is turning out to be a headache of note.
I'm convinced that the problem lies with my sessions. It seems that under stress testing; after certain time periods; and at other random intervals, the site won't work.
It can't be the session timeout period, because the default (according to W3Schools) is 20 minutes.
Check out the problem on my ">http://www.semper-backpacking.com/"> BookNow pages. Try it with different browsers and add and remove numerous times when it does work. (Note that this site is in test phase).
---------------------------------------------------------------------------------------------------------------------------------------------------
Update : Apparently Sessions are designed to handle only very small amounts of data like a sinle name or ip adress. Which means the 2 datatables i'm saving is too large. So I'll be writing to a db instead of using a session. Hopefully this will resolve the issue.
Any thoughts on this?
-
W3bbo said:lesmemphis said:*snip*
Save a copy of the generated markup from both production and development, ensure it validates, then run a diff. Then report back your findings.
It seems the problem was to do with sessions. Sometimes when I call a variable in a session it returns a null, but if I just call it again, it returns the value. So now I just build a check in. Haven't had the problem since. Still holding fingers crossed that it won't happen again.
-
W3bbo said:lesmemphis said:*snip*
MTU just affects efficiency of transfer, the same data is received by the client from the server, it just takes longer.
Cool, will do.
-
W3bbo said:lesmemphis said:*snip*
MTU just affects efficiency of transfer, the same data is received by the client from the server, it just takes longer.
damn, ok. So any idea what could be causing my problem? I've reviewed the code countless times and tried to debug from local host on numerous occassions and not once have I gotten the error, but as soon as the site is live, it happens.