|
Hi,
I have an ASP page which when called returns an XML page. I also have an application I'm working on with C# which I need to connect to that page. How can this be done?
I need to call the ASP page, read the data it returns and work with it.
Thanks.
In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)
|
|
|
|
|
The easiest way is to open the URL in a WebRequest and create a dataset from the result
<br />
DataSet dsFeed = new DataSet();<br />
WebRequest wq = WebRequest.Create(Url);<br />
WebResponse ws = wq.GetResponse();<br />
dsFeed.ReadXml(ws.GetResponseStream());<br />
ws.Close();<br />
wq = null;<br />
<code> <br />
<br />
<div class="ForumSig">.: I love it when a plan comes together :.<br />
<a href="http://www.zonderpunt.nl" target="_blank">http:
|
|
|
|
|
Your application should initiate a web request. This[^] article might help.
|
|
|
|
|
I have tried my application on Vista. it installs without any problem but whenever I try to run it I get this error message
"APD.exe has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available"
My application is developed in C# and .NET framework 2.0 .
it works fine on Windows XP so what is the solution to this problem?
|
|
|
|
|
In your solution did you set it to allow later versions of .Net?
As far as I understand Vista comes with .Net 3 and if you restrict your application (there is a little tick box in the setup project) to .Net 2 your application will not work.
You always pass failure on the way to success.
|
|
|
|
|
.NET 3 is an adjunct to .NET 2. In other words, Vista comes with 2 as well as 3 because 3 cannot exist without 2. I suspect the issue is more to do with the application violating things that Vista has locked down. It's possibly a file access issue.
|
|
|
|
|
What I was referring to is when you create a setup project, within the Launch Condition Properties there is a property called AllowLaterVersions.
If this is set to false then if the application is compiled in a .Net 2 environment the installation will not work on a machine with .Net 3 present.
This was an issue I experienced with a user having 3 on their machine - I changed this setting and it solved the issue.
It's kinda crazy really - why would you not want an application compiled in .Net 2 to to run in 3?
You always pass failure on the way to success.
modified on Wednesday, March 26, 2008 11:03 AM
|
|
|
|
|
|
Have you tried debugging your app under Vista? You have given very little information; I don't see how this can help us help you.
Cheers,
Vikram.
Zeppelin's law: In any Soapbox discussion involving Stan Shannon, the probability of the term "leftist" or "Marxist" appearing approaches 1 monotonically.
Harris' addendum: I think you meant "monotonously".
Martin's second addendum: Jeffersonian... I think that should at least get a mention.
|
|
|
|
|
Mohsen Saad wrote: My application is developed in C# and .NET framework 2.0 .
it works fine on Windows XP so what is the solution to this problem?
Debug the application. That's the solution.
Also, you might want to take a look at this[^].
|
|
|
|
|
What does the app do when it starts up? If you're trying to access certain parts of the registry, event logs, or certain disk folders you can see this type of behavior. You will need to run the application under a debugger to see what is happening.
Scott.
—In just two days, tomorrow will be yesterday.
—Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
[ Forum Guidelines] [ Articles] [ Blog]
|
|
|
|
|
I want to create a network speed monitor, but it needs to report back the speed (in Mbps) of the network between the machine that the code is running on and a specific machine (specified by name or ip address)
I have done a google search but cant find what i want (prob seach for the wrong stuff).
Should I use ping (System.Net.NetworkInformation.Ping)? but how do i work out the Mbps from a ping?
Any links or advice to get me started greatly apprechiated
|
|
|
|
|
Well, i guess you could use ping. A Ping sends 32 bytes of data, and you can find out how long your ping took, from that you can work out the speed.
But i think a better way would be to monitor the traffic thats already going through and find out how fast thats going. My firewall for example does this. But i have no idea how you would acheive this yourself.
My current favourite word is: Nipple!
-SK Genius
|
|
|
|
|
Just had a play with ping, but the problem is that its not accurate enough. It just comes back with RoundtripTime = 0, and if you ping in a cmd it just says <1ms
Any other ideas
|
|
|
|
|
I think the easiest solution must be somewhere near Performance Monitors. You can hook them to almost all system objects and receive loads of information. Network traffic etc MUST be one of them...
|
|
|
|
|
Been looking at those, but it looks like they just deal with how quick the NIC is, and they dont allow you to show the speed of a network between to computers
Any more suggestions most welcome
|
|
|
|
|
i am developing invoice management in which i want that the invoice record will store in database iff invoice is printed i.e. only when OK button on print dialoge is clicked. So i want to know which button OK or CANCEL is clicked.
|
|
|
|
|
If you are showing a dialog form you can set the Dialog result property of the ok and cancel buttons, then when you show the form check the dialog result.
eg
if(form1.ShowDialog() == DialogResult.OK)
{
//They pressed ok
}
else
{
//They canceled
}
|
|
|
|
|
If you mean the print dialog that pops up when you click on the print button on the reportviewer, I don't think you can. I was faced with the same problem before.
You might want to do without displaying the report viewer and use your own Yes/No dialog and print to printer directly.
|
|
|
|
|
I have populated a datagridview control with decimal numbers as below.
It also has a last row as Total.
How do I sum the figures in each column to place into the appropriate cell for the final row i.e. Total row?
Thanks
country column1 column2 column3
Russia 24,987.524 543,711,654.890 5,554.875
UK 65,977.324 513,311,254.690 6,654.175
US 84,987.524 943,711,654.890 3,554.875
Total
|
|
|
|
|
In order to get the summation there might be some methods exposed by the datagridview.
If not,then you can use the values from the dataset whuch you have used in the previous case to populate the datagridview....
I hope that helps you out....
|
|
|
|
|
If you use web form, you can use the footer. If you use win form, you probably need to insert a row in the datasource for the total. Don't think there's footer in datagridview for winforms I don't think.
|
|
|
|
|
I've got a setup project that installs fine on a clean machine but i get an error when I try to install over the top of a previous install.
This is a problem i ran into ages ago but i left it as I was the only person doing installs at the time. Now that the software is being tested I need to get the setup process working right.
Having read up loads about the issues involved i cam to the following conclusions:
DetectNewerInstalledVersion should be set to true
InstallAllUsers should be the same for every build (Set to true)
ProductCode should be updated every build (As suggested by VS when the verion number is changed)
Upgrade code remains the same for all builds at the moment
Version number is changed per build
When i build and install this package I get a duplicate in Add/Remove programs, I guess it's better than an error but it's still not great, does anyone know what i've done wrong?
Cheers
Russell
|
|
|
|
|
Can we write Games in C# ......other than board games
Please send the links ....
Dont Get Paid for the Hours you worked, Get Paid for the Work You Have Done in an Hour.
|
|
|
|
|
ALT + F4 wrote: Can we write Games in C# ......other than board games
Please send the links ....
Yes and No. Now, it's up to you to guess which answer goes with which part of your post.
[Hint]There's this new-fangled technology that you probably haven't heard of called a search-engine that might, just possibly, be able to search for answers for you[/Hint].
|
|
|
|