|
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
|
|
|
|
|
if you want to run a program with admin rights after login you can make a scheduled task.
I did it for remove c$ and admin$.
|
|
|
|
|
You can disable the administrative shares properly if you want.
http://en.wikipedia.org/wiki/Administrative_share#How_to_disable[^]
It's not really necessary though. They are only accessibly locally on the domain and you have to have local admin access on the PC to view them. If someone has local admin access, they could just log in and create any shares they wanted anyway. It isn't a security hole to all your files. We use them quite a bit, it's handy to get to log files and stuff without having to go to the PC, or remote in, or create a proper share.
Simon
|
|
|
|
|
good article thanks, but there is no in VISTA
Hive: HKEY_LOCAL_MACHINE
Key: SYSTEM\CurrentControlSet\Services\LanManServer\Parameters
Name: AutoShareWks
where is AutoShareWks?
modified on Friday, July 18, 2008 8:49 AM
|
|
|
|
|
You have to create it. (it's a DWORD type key)
Simon
|
|
|
|
|
Hey Guys,
I am a newbie to .NET and I need help with databinding a dropdown control at the backend(aspx.cs) file, also there is second part to it which is, based on the selection on the dropdown, the data on the grid view control needs to filtered. Sorry about the long description, please help!!!!!!
Thanks in advance.
Sam
|
|
|
|
|
Hi,
I my opinion i think you should make all your filters and sorts in SQL Store Procedures.
After that, trigger the SP´s in some kind of events; like the Button_Click or DropDown_SelectIndexChanged as in your case!!!
I assume that you are ok on making SP´s.
I don´t filter or sort data in C# but it is possible, my way works just fine!!!
Do it and if you became stuck ask here again
|
|
|
|
|
Thanks for the suggestion (sorry don't know your name). But I did it through C# code as follow:
ddlStatus.DataTextField = "Value";
ddlStatus.DataValueField = "key";
ddlStatus.DataSource = StatusList;
ddlStatus.DataBind();
I didn't have the datafields before since we are using the repository system here also I am new to using controllers and repository system. But thanks a lot for your reply. Catch up the next time!
S
|
|
|
|
|
I am porting a VB6 winsock.ocx based library to a .Net Sockets implementation, and I am not the most savvy sockets programmer. The architecture of the communication system was designed long before I got here; so changing the overall design is not an option. Moreover, this system has a low frequency of tcp traffic, so the Socket.Connected will almost always be out-of-date.
The fundamental issue is the connected property of the socket. It does not seem to be funcitonal; however, I have found others that have had similar issues http://msdn.microsoft.com/en-us/library/system.net.sockets.socket.connected.aspx[^]
When I stepping-through the code in the debugger, unplug the network at the right moment, and view the sock object with the quick watcher, it shows me the value of sock.Connected has changed to false as expected. However, while running the code below, in debug mode but not stepping-through, the behavior of sock.Connected is different (when I unplug the wire, it does not update to false).
Thoughts?
private bool isConnected(){
bool rVal = false;
try
{
bool blcking = sock.Blocking;
try
{
byte[] junk = new byte[2];
sock.Blocking = false;
sock.Send(junk, 1, 0, SocketFlags.None);
rVal = sock.Connected;
}
finally
{
sock.Blocking = blcking;
}
}
catch (SocketException e)
{
rVal = e.SocketErrorCode == SocketError.WouldBlock;
}
return rVal;
}
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|