15,899,679 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Naveen Singh (Top 62 by date)
Naveen Singh
3-Aug-16 5:18am
View
as of same i achieved for web API too.
Naveen Singh
3-Aug-16 5:17am
View
i have one test method in one of my web service for which i use below method to achieve the test:
private static void GetVersion()
{
var url = "http://XXXXXX/XXXXX/service.asmx/GetStatus";
string result = "";
var myRequest = (HttpWebRequest)WebRequest.Create(url);
var response = (HttpWebResponse)myRequest.GetResponse();
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
result = sr.ReadToEnd();
sr.Close();
}
XmlDocument xd = new XmlDocument();
xd.LoadXml(result);
XmlElement xe = xd["string"];
Console.WriteLine(xe.InnerText);
Console.ReadKey();
}
and for window service i used below :
private static void WindowServiceStatusPass()
{
ConnectionOptions options =
new ConnectionOptions();
options.Username = @"xxxxx";
options.Password = "xxxxx";
ManagementScope scope =
new ManagementScope(
"\\\\xxxxxxx\\root\\cimv2", options);
scope.Connect();
ObjectQuery query = new ObjectQuery(
"SELECT * FROM Win32_Service WHERE Name = 'test.Service_8.0'");
ManagementObjectSearcher searcher =
new ManagementObjectSearcher(scope, query);
ManagementObjectCollection queryCollection = searcher.Get();
foreach (ManagementObject queryObj in queryCollection)
{
Console.WriteLine("-----------------------------------");
Console.WriteLine("Win32_Service instance");
Console.WriteLine("-----------------------------------");
Console.WriteLine("Name: {0}", queryObj["Name"]);
Console.WriteLine("Status: {0}", queryObj["Status"]);
Console.WriteLine("State: {0}", queryObj["State"]);
}
Its just the POC code but im getting what i exactly want from here
Naveen Singh
8-Nov-15 6:41am
View
hi Krunal thanks for yours response but i am getting :-
System.Xml.XmlException' occurred in System.Xml.dll
error.
Naveen Singh
8-Nov-15 5:22am
View
hi suvendu thanks for yours response but i am getting :-
System.Xml.XmlException' occurred in System.Xml.dll
error.
Naveen Singh
21-May-15 6:58am
View
doesnt work for me :(
Naveen Singh
21-May-15 6:01am
View
but i cannot cocatinate \ as its not allowed in c#
Naveen Singh
21-May-15 5:15am
View
HI Richard thanks for yours response but still iam getting 19\\//5\\//1990 this format value.my code is
DateTime datevalue = Convert.ToDateTime(sDate.ToString());
String dy = datevalue.Day.ToString();
String mn = datevalue.Month.ToString();
String yy = datevalue.Year.ToString();
string date = dy + "\\" + "//" + mn + "\\" + "//" + yy;
Naveen Singh
21-May-15 4:10am
View
Deepu what happened is my query not clear ?
Naveen Singh
21-May-15 3:59am
View
Hi Richard Thanks for yours reply i tried all this but c# donot allow \ this because it is a escape character so while when i try to format in yours manner its shows error.
Naveen Singh
21-May-15 3:42am
View
C# donot allow to put single \ when i take output its is single \ but when i assign value on server side it reamains "dd\\/mm\\/yyyy" i just want to convert this into -> dd\/mm\/yyyy i dnnt have to print i just have to assign value on server side and then post not have to print.
Naveen Singh
21-May-15 3:42am
View
C# donot allow to put single \ when i take output its is single \ but when i assign value on server side it reamains "dd\\/mm\\/yyyy" i just want to convert this into -> dd\/mm\/yyyy i dnnt have to print i just have to assign value on server side and then post not have to print.
Naveen Singh
17-Dec-14 2:03am
View
thaknx Praveen for yours warm support and response nd vil do it.
Naveen Singh
15-Dec-14 4:58am
View
Task.Run(()=> Method()
);
i'm using this because this also facilitate me to pool the the task and manage them.
Naveen Singh
11-Dec-14 1:47am
View
Because i have a huge amount of request per second .
Naveen Singh
11-Dec-14 1:47am
View
i want only single thread which gets free after requesting for response , don't wait for response and process the next request !
Naveen Singh
11-Dec-14 1:36am
View
It creates new thread for every request ?
Naveen Singh
11-Dec-14 1:05am
View
Thanks Praveen but should i call any async on page load and will this thread get free after every request.
Naveen Singh
10-Dec-14 8:22am
View
it's an restful service and i am using a method for my Requirement and and release that method immediately .
Naveen Singh
10-Dec-14 7:59am
View
I m stuck at how could i process make this method log() async ?
Naveen Singh
10-Dec-14 7:31am
View
I have to implement on page load using REST protocol.
Naveen Singh
5-Nov-14 4:50am
View
i want to retrieve result from FormsAuthentication.RedirectFromLoginPage(string,boolean) this string value not need any session to tranfer value !
Naveen Singh
5-Nov-14 4:48am
View
no session has been used.
Naveen Singh
5-Nov-14 3:32am
View
i mean after succesfull login thev result page
Naveen Singh
9-Oct-14 7:40am
View
Rohan i am asking how could i do this ...i mean how will i sort or filter the data before display on data gridview.
Naveen Singh
24-Sep-14 2:55am
View
thanks every one i have solved my problem.
Naveen Singh
24-Sep-14 2:53am
View
in my code "localIPs" hold two IP values ..!one is real IP and other is somewhat ::1 type nad it only returns ::1 value but i have to fetch actual value ?
Naveen Singh
24-Sep-14 2:43am
View
hi SA...! yes Ip contains one valid address and one address like ::1 but i have to fetch actual address how could i get that ?
Naveen Singh
24-Sep-14 2:33am
View
Thanks Manas But it shows 'localIPs[0].Address' threw an exception of type 'System.Net.Sockets.SocketException'
and
returns some what like ::1
Naveen Singh
16-Sep-14 4:28am
View
thank you so much Magic Wonder it really works for me..!
Naveen Singh
16-Sep-14 4:07am
View
thanks Magic Wonder but i have one more query that how could i check the uniqueness of that record in database ?because it that record is replicated that i have to return invalid request message
Naveen Singh
12-Sep-14 3:30am
View
yes but no result .
Naveen Singh
12-Sep-14 3:13am
View
It is not working for me and i have already tried..!!! but problem not resolved.
Naveen Singh
12-Sep-14 2:42am
View
@Syed Asif tmp.vale returns null ....!
Naveen Singh
11-Sep-14 8:14am
View
thanks Sinisa Hajnal :)
Naveen Singh
11-Sep-14 8:06am
View
and i am beginner to development so need a brief view how to access sql database and write query to find data in row ?
Naveen Singh
11-Sep-14 8:04am
View
actually i want an stored procedure that first check that data in database if found then it will process further in that SP.
Naveen Singh
11-Sep-14 7:58am
View
i have a request id which i extracted from an xml string and i have to check that the particular request id exist in databse or not ?
Naveen Singh
11-Sep-14 2:04am
View
i am fetching this string from sql database...then how can i use this expression.Thanks Syed Asif
Naveen Singh
3-Sep-14 3:32am
View
somewhat a unique transaction
Naveen Singh
3-Sep-14 2:04am
View
what why i have to generate a sequence no for that purpose i need that
Naveen Singh
3-Sep-14 2:00am
View
i want to use databse method for this purpose
Naveen Singh
25-Aug-14 5:20am
View
how could i do so by creating function ?
Naveen Singh
20-Aug-14 5:01am
View
thnkx SA
Naveen Singh
19-Aug-14 4:34am
View
string[] darr;
have this empty data ?
Naveen Singh
19-Aug-14 2:55am
View
string dob1 = darr[1].ToString() + "/" + darr[0].ToString() + "/" + darr[2].ToString();
Naveen Singh
1-Aug-14 6:50am
View
wtf
Naveen Singh
1-Aug-14 6:37am
View
it is showing error return must not be followed by an object expression.!
i am just posting return random;
please help
Naveen Singh
1-Aug-14 6:14am
View
Orinialgriff thanks for your reply but how could i return or get the value ?
Naveen Singh
17-Jul-14 6:04am
View
can you give any illustration so that it will be easy for me to implement ..!
Naveen Singh
17-Jul-14 5:02am
View
dear Arun Sir thanks for time and response but i have to pass only 4 parameter in my SOAP wcf service request and want 7 parameter in soap response ..?can you please help me
Naveen Singh
17-Jul-14 4:14am
View
It is really urgent please help
Naveen Singh
17-Jul-14 4:14am
View
WCF
Naveen Singh
17-Jul-14 3:20am
View
no two different method with different name...!
Naveen Singh
16-Jul-14 6:41am
View
In above suggested procedure JavaScript function is used to call the Service on any specific event.
Naveen Singh
16-Jul-14 6:26am
View
how ? what will be the procedure ?
Naveen Singh
16-Jul-14 6:08am
View
can it be implemented without any use of java script..?
Naveen Singh
16-Jul-14 5:52am
View
no i have generated proxy class adding web reference but now i have to create the object of the proxy class then use service method using these class.....!!but have no idea so i want a complete beginner guide.
Naveen Singh
16-Jul-14 5:07am
View
this is the exact method i am asking for..!!thank you and i will ask u if have further doubt :
Naveen Singh
16-Jul-14 2:59am
View
how to communicate with service method of the object of that particular class ....!it is SOAP based service.....thanks in advance
Naveen Singh
16-Jul-14 2:51am
View
how to communicate with service method of the object of that particular class ....!thanks in advance
Naveen Singh
16-Jul-14 2:49am
View
i have created proxy class but what what are the next steps as i have never tried this earlier ??
Naveen Singh
16-Jul-14 2:36am
View
Thnkx Arun but i want more detail explanation as i have gone through it...!i have only url of service is known and i know the method and parameter in service i just want detail how can i use these in my own custom application to test these services.
Show More