|
Sorry led mike, I have not made question clear enough. I am not developing server side application, but writing an Http client to request some pages for data to use.
My question is, if at Http client side, there is 502 or 503 error, how could the client improve itself to reduce some error? I am not sure whether it is caused by missing some Http session/cookie/headers?
regards,
George
|
|
|
|
|
1 - I don't think that there is perfromance benefits. One example of why it is used would be to organize things. So a user can request for books to a proxy server and proxy knows where to find the information and it redirects the request to there. Proxy servers usually alters the original request they got. When these servers are just redirecting the request to another one, it's called as gateway, not proxy.
2 - No. 503 is shown when server is overloaded or when it just refuses the connection.
|
|
|
|
|
Thanks N a v a n e e t h,
1.
You mean gateway is served as redirection purpose and proxy is served as performance improvement purpose?
2.
N a v a n e e t h wrote: No. 503 is shown when server is overloaded or when it just refuses the connection.
I agree it is one reason why server returns 503, but is it the only reason? Do you have any documents to support your claim?
regards,
George
|
|
|
|
|
1 - If a server just redirects the request to another server, it is gateway. When server alteres the request and pass that to another server, it is proxy. There is no performance considertations, AFAIK.
2 - Yeah, W3C tells this is the reason. You can find the defnition in the URL which I given in an earlier post.
|
|
|
|
|
Thanks N a v a n e e t h,
1.
"If a server just redirects the request to another server, it is gateway"
"alteres the request and pass that to another server, it is proxy"
From your above two statements, I can not see any differences.
Sorry my English is not very good, could you clarify please?
2.
N a v a n e e t h wrote: Yeah, W3C tells this is the reason. You can find the defnition in the URL which I given in an earlier post.
Yes, it tells the reason in general. But not telling whether I could improve it by client side. Any ideas or comments?
regards,
George
|
|
|
|
|
George_George wrote: From your above two statements, I can not see any differences
is it ? "If a server redirects the request to another server without modifying the request details, it's called as gateway. When it modifies the request it gets, say it may add some more headers to the request, and redirects the modified request to another server, then it is known as proxy".
George_George wrote: But not telling whether I could improve it by client side
You need to keep what they said in mind and do testing. I don't think you will get a better explanation.
|
|
|
|
|
Thanks N a v a n e e t h,
1.
N a v a n e e t h wrote: may add some more headers to the request
For what purpose?
2.
You mentioned using proxy or gateway is not for performance improvement, so what is its purpose?
3.
N a v a n e e t h wrote: You need to keep what they said in mind and do testing. I don't think you will get a better explanation.
I could only think of retry if it is server maintenance issue. Do you have any ideas or experience of how to avoid such issues from client side?
regards,
George
|
|
|
|
|
George_George wrote: Do you have any ideas or experience of how to avoid such issues from client side?
What? How can you avoid a server condition from client side? That makes no sense at all.
George_George wrote: You mentioned using proxy or gateway is not for performance improvement, so what is its purpose?
What is it's purpose? Are you kidding me? You don't think that information is easily obtained elsewhere on the internet? Do you have some sort of job that pays you based on the number of questions you ask in internet forums?
http://en.wikipedia.org/wiki/Web_proxy[^]
led mike
|
|
|
|
|
Thanks led mike!
led mike wrote: What? How can you avoid a server condition from client side? That makes no sense at all.
I am just wondering whether this error could be caused by missong some Http header fields or some Http body fields from client side? Or just a server side issue?
regards,
George
|
|
|
|
|
George_George wrote: For what purpose?
I was just telling an example, in reality something else will be happening. Concept is proxy modifies the request it gets and redirects tp other server.
George_George wrote: You mentioned using proxy or gateway is not for performance improvement, so what is its purpose?
It's for organizing datas.
George_George wrote: Do you have any ideas or experience of how to avoid such issues from client side?
Sorry, that doesn't make any sense. It's a server side issue and how you are hoping it to be fixed from client side ?
|
|
|
|
|
Thanks N a v a n e e t h,
1.
N a v a n e e t h wrote: modifies the request it gets and redirects tp other server.
Why modify the content? To facilitate what?
2.
N a v a n e e t h wrote: organizing datas
You mean keep backend servers transparent to outside? Better to deployment?
3.
N a v a n e e t h wrote: Sorry, that doesn't make any sense. It's a server side issue and how you are hoping it to be fixed from client side ?
I am just wondering whether this error could be caused by missong some Http header fields or some Http body fields from client side? Or just a server side issue?
regards,
George
|
|
|
|
|
George_George wrote: Why modify the content? To facilitate what?
It depends. Sometimes the other server which is serving request to proxy needs more/less headers. In that case it will modify it.
George_George wrote: You mean keep backend servers transparent to outside? Better to deployment?
Yeah. It would be easy to find and manage information.
George_George wrote: I am just wondering whether this error could be caused by missong some Http header fields or some Http body fields from client side? Or just a server side issue?
Hard to tell without knowing more. Use "Fiddler" and scan the request headers. Make sure everything looks correct.
|
|
|
|
|
Thanks N a v a n e e t h,
I did some study these days. There are two different types of proxies.
1. The proxy runned by local ISP to speed up network traffic for local users (e.g. proxy inside a company or school);
2. The proxy runned by the web site company.
In case of 502/503 headers, I think it mean proxy/gateway in context (2). My confusion is, if the proxy is for context (1), how could a general proxy be able to know every specific headers needed by any specific web site so that the proxy could modify? Correct?
regards,
George
|
|
|
|
|
Hi all,
Is there any maximum buffer size while displaying some data to the grid...
Thank
vikas da
|
|
|
|
|
Hi everyone,
i am developing one application in that i need to get data from excel sheet to the dataset after that i'll have some calculations to do.
In the excel sheet i have one column [dateregistered] the date format in that column is (mm/dd/yyyy hh:mm) i want the date format to be (mm/dd/yyy) from sql query.
i have written a query below which is giving me error
Syntax error (missing operator) in query expression 'CONVERT(varchar ,[dateregistered],103) Dates'.
here i am getting the data directly from excel sheet not from sql server
so i want know how to use convert function for retriving data from excel sheet
<br />
string sql = "select CONVERT(varchar ,[dateregistered],103) Dates,[user],[client facility],sum([payroll score])LC from [sheet1$] group by [user],[client facility], CONVERT(varchar ,[dateregistered],103) order by [docQscribe user]";<br />
da = new OleDbDataAdapter(sql, con);<br />
ds = new DataSet();<br />
da.Fill(ds,"Table1");<br />
|
|
|
|
|
sunilwise wrote: string sql = "select CONVERT(varchar ,[dateregistered],103) Dates,[user],[client facility],sum([payroll score])LC from [sheet1$] group by [user],[client facility], CONVERT(varchar ,[dateregistered],103) order by [user]";
no probs i got the solution i modified my query to
string sql = "select format([dateregistered],'MM/dd/yyyy') as Dates,[user],[client facility],sum([payroll score]) as LC from [sheet1$] group by [user],[client facility], format([dateregistered],'MM/dd/yyyy') order by [user]";
its working gr8 for me
|
|
|
|
|
Hi
I am creating windows service for finding the job information using WMI.Service is installed successfully.
I can start service successfully, but, when I give command to print some document. The document get s printed but that time, it does not track any job status. I am not getting printer job using ManagementObjectCollection printJobs = printJobsSeacher.Get();.
I want to know how can I Get printer job staus when I use window service.I think , I am doing some mistak .Plese help me.
public partial class WMIPrinterService : ServiceBase
{
static Timer oTimer;
public const int iInterval = 200;
public WMIPrinterService()
{
InitializeComponent();
}
protected override void OnStart(string[] args)
{
oTimer = new Timer(new TimerCallback(Callback), this, 0, iInterval);
}
public void Callback(object sender)
{
GetStatus();
}
protected override void OnStop() { }
void GetStatus()
{
ManagementObjectSearcher printJobsSeacher = new ManagementObjectSearcher(@"SELECT * FROM Win32_PrintJob");
ManagementObjectCollection printJobs = printJobsSeacher.Get();
foreach (ManagementObject item in printJobs)
{
// Print JobStatus
}
}
}
Regards
Rajesh
rajesh
|
|
|
|
|
Rajesh_K_Sharma wrote: void GetStatus()
{
ManagementObjectSearcher printJobsSeacher = new ManagementObjectSearcher(@"SELECT * FROM Win32_PrintJob");
ManagementObjectCollection printJobs = printJobsSeacher.Get();
foreach (ManagementObject item in printJobs)
{
// Print JobStatus
}
}
}
if your run this code with out services does this get the print job status?
try this
<br />
using System;<br />
using System.Management;<br />
using System.Windows.Forms;<br />
<br />
namespace WMISample<br />
{<br />
public class MyWMIQuery<br />
{<br />
public static void Main()<br />
{<br />
try<br />
{<br />
ManagementObjectSearcher searcher = <br />
new ManagementObjectSearcher("root\\CIMV2", <br />
"SELECT * FROM Win32_PrintJob"); <br />
<br />
foreach (ManagementObject queryObj in searcher.Get())<br />
{<br />
Console.WriteLine("-----------------------------------");<br />
Console.WriteLine("Win32_PrintJob instance");<br />
Console.WriteLine("-----------------------------------");<br />
Console.WriteLine("JobStatus: {0}", queryObj["JobStatus"]);<br />
}<br />
}<br />
catch (ManagementException e)<br />
{<br />
MessageBox.Show("An error occurred while querying for WMI data: " + e.Message);<br />
}<br />
}<br />
}<br />
}<br />
cheers,
Abhijit
|
|
|
|
|
Hi Abhijit
Thanks,
I would like to implement in windows service not in console application . I already did in console and window form application.It works fine . But when I use in windows service . It don't work.
rajesh
|
|
|
|
|
hi friend i want to get the list of the database server on local computer or network using C# code can any body tell me how i can get that list of the server's
wasim khan
|
|
|
|
|
|
|
Thanx Jimmanuel its realy help me
wasim khan
|
|
|
|
|
im trying to write to hklm so i can set my app to start up with windows, however, vista refuses access to hklm, any way to elevate the program access rights?
|
|
|
|
|
You need to include a manifest in your app to tell vista that it requires elevation.
Alternatively, there are API methods you can call to only elevate briefly while you perform the action. You should still include a manifest though, because it's in the manifest you tell vista your app is aware of UAC and how vista should behave.
Simon
|
|
|
|