|
I am developing a web application which has to make asynchronous calls because I have to make sure UI thread is not hanged.
In my application I have around 15 projects like SampleProject1, SP.BLSP, SP.Web, .. Also for every service call there is two minutes timeout.
I am trying to implement signalR in my code for waiting until each function is executed completely. Please see the following sample code.
After the first service call completed, it calls the second. The second call will surely takes more than two minutes. It might take more than 10 mins.
And I need to use results from first service call in second.
When implementing signalR, I tried to install Microsoft.Owin It asked for which project to add. I am trying to add SignalR Startup class in my SampleProject1.
I am not sure if:
1. SignalR is right way for doing this approach or not.
2. If I can use SignalR, in which project should I add this Microsoft.Owin
I tried google but most of them showed how to implement in new project and with out web service calls.
For example:
namespace SampleProject1
{
public partial class lengthProcess : UserControl
{
public lengthProcess()
{
FirstWebServiceCaller1 FWbSvcCallr1 = new FirstWebServiceCaller1();
FWbSvcCallr1.Process1Completed += new EventHandler<request1completedeventargs>(FirstWebServiceCaller1_Process1Completed);
FWbSvcCallr1.Process1();
}
private void FirstWebServiceCaller1_Process1Completed(Object sender, Request1CompletedEventArgs e)
{
FirstWebServiceCaller1 FWbSvcCallr1 = sender as FirstWebServiceCaller1;
if (FWbSvcCallr1 != null)
FWbSvcCallr1.Process1Completed -= WebServiceCaller1_Process1Completed;
if(e != null)
{
SecondWebServiceCaller2 SWbSvcCallr2 = new SecondWebServiceCaller2();
SWbSvcCallr2.Process2Completed += new EventHandler<Request2CompletedEventArgs>(SecondWebServiceCaller2_Process1Completed);
SWbSvcCallr2.Process2(e.Results);
}
}
private void SecondWebServiceCaller1_Process2Completed(Object sender, Request2CompletedEventArgs e)
{
DoSomething(e.Results);
}
private void DoSomething()
{
}
}
}
Thanks in advance.
Valli.
|
|
|
|
|
I'm not sure exactly what you were asking there, but it appears as though you want to know how to increase the timeout. Is this correct? If it is, you should look to configure the ConnectionTimeout as described here[^].
|
|
|
|
|
Hi
I have a fingerprint reader on my laptop. It is used for the windows authentification.... I'm searching any information and samples of source code in C# to access to this device.... Thanks
Jerome
www.jfortias.net
Jerome
www.onplonge.com
www.sap-integration.net
|
|
|
|
|
The reader must have an API of some description. Your best bet is to start off with the manufacturer site and see what documentation/API details are available there.
|
|
|
|
|
I tried to find it but that's a dell laptop
Jerome
www.onplonge.com
www.sap-integration.net
|
|
|
|
|
Your best bet is to collect some information:
1. The computer are you using (Make, Model, etc.)
2. On your computer investigate all of the installed devices using the device manager (found under Start/Settings)
3. Once you've found the device in question use the context menu and open the property dialog.
4. Go through all the tabs and see what drivers and dlls are installed for the device.
5. Use all of the above information to make intelligent queries on the internet using your favorite search engine.
6. Also contact the maker of your computer if the device came preinstalled and ask them about information of said device.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
Thanks a lot
i was too much confused. Thanks a lot
I'll do it
J
Jerome
www.onplonge.com
www.sap-integration.net
|
|
|
|
|
Did find out what device is installed in your system?
I'm just curious, you know.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
jerome.fortias@gmail.com wrote: I'm searching any information and samples of source code in C# to access to this
device.... You could try and see if it supports the Griaule SDK. There's a coding4fun article here[^] that uses it, albeit it is for another fingerprint device.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi!
I'm going to make a video file from images on .NET using Aforge.Video.FFMpeg.dll.
But I have only FFMpeg.dll which compiled on .NET3.5.
I think compile .NET wrapper.
Unfortunately, I couldn't search Aforge.Video.FFMpeg source.
Thanks.
modified 1-Apr-15 6:34am.
|
|
|
|
|
Errm, the source is available here[^]. The FFMPEG is in C++ so you will need to be able to compile C++, but it's available for you to recompile.
|
|
|
|
|
Thanks,
With your selflessly help, I can use FFMpeg.dll on .NET4.5.
|
|
|
|
|
That's great. Congratulations.
|
|
|
|
|
Out of randomness, I updated the library to the latest FFmpeg version. I have it as .NET 4.5.2, but I will gladly do a 4.5 build for you if you want. Do you need MSVC 11 (VS 2012) or MSVC 12 (VS 2013)? Or is either fine?
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Hello Friends,
My task is to upload a CSV file into a specified FTP loacation.But the system is throwing time out message from a line of the code. Please help me out on this issue.
Below is the code i use.
public static string UploadFile(string ftpUrl, string userName, string password, string uploadFTPDirectory, string localFilePath)
{
string PureFileName = new FileInfo(localFilePath).Name;
String uploadUrl = String.Format("{0}{1}/{2}", ftpUrl, uploadFTPDirectory, PureFileName);
//String uploadUrl = String.Format("{0}{1}", ftpUrl, uploadFTPDirectory);
FtpWebRequest ftpRequest = (FtpWebRequest)FtpWebRequest.Create(uploadUrl);
ftpRequest.Proxy =null;
ftpRequest.Method = WebRequestMethods.Ftp.UploadFile;
ftpRequest.Credentials = new NetworkCredential(userName, password);
ftpRequest.UseBinary = true;
ftpRequest.UsePassive = false;
try
{
byte[] fileData = File.ReadAllBytes(localFilePath);
ftpRequest.ContentLength = fileData.Length;
using (Stream fileStream = ftpRequest.GetRequestStream())
{
fileStream.Write(fileData, 0, fileData.Length);
fileStream.Close();
}
using (FtpWebResponse ftpResponse = (FtpWebResponse)ftpRequest.GetResponse())----------'Sytem throws the Timed out Message here.'
{
return ftpResponse.StatusDescription;
}
}
catch(WebException e)
{
string s = ((FtpWebResponse)e.Response).StatusDescription;
return s;
}
}
|
|
|
|
|
Have you tried do it manually to make sure that its not the FTP site that is timing out?
Every day, thousands of innocent plants are killed by vegetarians.
Help end the violence EAT BACON
|
|
|
|
|
Hi Simon,
I tried doing it manually and it and its working fine... But the program is not allowing me to upload the file.
With Thanks and Regards,
Rajeev M Kartha
|
|
|
|
|
i have to create form and connected to the sql server ..
means what are the values given in form it stores in database ,and i gave primary key to id..
when i enter same id value it will shown one popup box.
can you plesase hlep me how to create popup box
|
|
|
|
|
Assuming this is WinForms - which the "create form" implies - a "popup box" is just a form which you are showing using the ShowDialog method:
MyPopup mp = new MyPopup();
mp.ShowDialog(); The form will be displayed, and the code will stop until the user closes it.
Alternatively, you could use a MessageBox:
MessageBox.Show("This is a popup!");
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
I would like to load different web page depending on browser. for example
I have internetexp.aspx and chrome.aspx.
if user browser is chrome it should load chorme.aspx page if other then chrome browser it should load internetexp.aspx.
how can i achieve this?
|
|
|
|
|
Request.Browser[^] which is of type HttpBrowserCapabilities[^] has a property called Browser[^] which you can use to detect the browser that is using the application. From there, you should be able to do a redirect to the specific page depending on what is in the value of that particular property.
Signature construction in progress. Sorry for the inconvenience.
Damn you have the perfect signature - CBadger
|
|
|
|
|
Hi all, my home page accesses a csv file when it loads and populates certain elements on the page with data from the csv file. Right now I have yet to implement authentication so there is no need to login. I tried to see how its performance will be affected by multiple users accessing the csv file simultaneously by hosting this app on my home server and opening the app in multiple tabs in IE.
The page hangs and I had to reset my server each time it hangs. So the question I have is, is opening the same app (copying and pasting the url) in a new tab considered to be using the same session or is it considered to be using a new session.
If the app is hanging due to the same session being used multiple times simultaneously, how do I solve this problem? Thanks for your help.
modified 31-Mar-15 10:22am.
|
|
|
|
|
How are you opening and reading the CSV file? If it's opened without allowing for a shared read all other browser requests will not be filled until the first request closes the file.
Frankly, a CSV file is not a proper data store for a web application because of the very problem you're running into.
One solution is, if the data isn't changing in the CSV file, to read the data once and cache it for future requests.
Another is to just import the data into a database engine and the web app reads it from there.
|
|
|
|
|
Hi Dave, thanks for replying. You said that I can allow shared read of text files. Is this something I can configure on the server? Thanks again for your help.
|
|
|
|