|
Well, have you asked the people who create this dll ? Why do you assume it's possible ? It may well not be.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
uh,It's a open source dll,so many people use it,I don't know it can create a self-extractor or not,but I think it can do it. Jesus,my english is too bad.
|
|
|
|
|
Oliver Misear wrote: uh,It's a open source dll,so many people use it,
Yes, sure. But, if you come to a place that's not dedicated to this library, only SOME people here will use it. Everyone on a forum for that library, will use it. The docs will also tell you how to use it. Surely they have documentation ?
I typed your question in to google and found this thread.
http://www.eggheadcafe.com/community/aspnet/2/15981/switch-over-to-sharpzipli.aspx[^]
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
usually you have a tool which produce an exe with a well known fix size.
then you have a tool which append a compressed zip to the exe file
then, when run, the exe file will remove its extra data file and unzip it!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
Hi im trying to use a c# dll i found here for telnet scripting . Ive added it to the reference's and its showing up in the object browser correctly but when i try the following code
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telnet;
namespace test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
ScriptingTelnet.Connect();
}
}
}
I get the exception
Error 1 An object reference is required for the nonstatic field, method, or property 'objActiveSolutions.ScriptingTelnet.Connect()' C:\Users\Shuttle\Desktop\test1\test1\Form1.cs 21 13 test1
Im pretty new to c# but ive all ready added the reference with using Telnet; can anyone tell me how to use this c# dll ?
|
|
|
|
|
I think you need to learn some basic C#. The error means what it says. You need to create an instance of the object, to call an instance method.
ScriptingTelnet st = new ScriptingTelnet();
st.Connect();
at a minimum. But, if you don't learn some C#, you're just going to keep coming to grief.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Thanks to some help in another thread I found out the reason an audio app is not working on some machines is because it requires the managed version of DirectX, which is not installed on most computers. Is there a known-good way to detect managed DirectX, specifically DirectSound? I know where the files are stored on the machines we've checked so far, but it would be nice to have something a little less haphazard.
|
|
|
|
|
It's suppose to login to this site here:http://www.govconnection.com
The problem is it gets redirected..
I have NO clue on this one.
I'm hoping someone's talented enough to handle this.
public void loginToSite()
{
string formUrl = "http://www.govconnection.com/IPA/Account/Login.htm";
string formParams = "__EVENTTARGET=&__EVENTARGUMENT=&__VIEWSTATE=%2FwEPDwUJNjYxOTQ0NzIyD2QWAmYPZBYCAgYQFgIeCG9uc3VibWl0BRxyZXR1cm4gQ29tcGxldGVBc3luY0NhbGxzKCk7ZBYCAgcPDxYEHghDc3NDbGFzcwUNc2l0ZUNvbnRhaW5lch4EXyFTQgICZBYEAgEPDxYEHwEFI2ZhdXhDb2x1bW5XcmFwIGNsZWFyIHdpdGhCYWNrZ3JvdW5kHwICAmQWAgIBDw8WBB8BBQdjb250ZW50HwICAmQWBgIBD2QWBgIBDxYCHgdWaXNpYmxlaBYEAgEPFgIfA2hkAgMPDxYCHwNoZGQCAw9kFgICAg8QZGQUKwACMtMBAAEAAAD%2F%2F%2F%2F%2FAQAAAAAAAAAMAgAAAEBJUEEuV2ViLCBWZXJzaW9uPTUuMC42MTEuMSwgQ3VsdHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1udWxsBQEAAAAuSVBBLldlYi5VSS5Db250cm9scy5Ecm9wRG93bkxpc3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C9Qcm9kdWN0L1NlYXJjaC5odG0nKTtkAgMPFgIeB29uY2xpY2sFdXNfb2JqZWN0SUQgPSAnc2VhcmNoR29CdXR0b24nO3MudGwodGhpcywnbycsc19vYmplY3RJRCk7IGV4ZWN1dGVTZWFyY2goJy9JUEEvU2hvcC9Qcm9kdWN0L1NlYXJjaC5odG0nKTsgcmV0dXJuIGZhbHNlOxYCZg8PFgIfBgUbL1NraW5zL1BDQ0dPVi9pbWFnZXMvZ28uZ2lmZGQYAQUeX19Db250cm9sc1JlcXVpcmVQb3N0QmFja0tleV9fFgMFF2N0bDAwJGdyb3VwRHJvcGRvd25MaXN0BSljdGwwMCRDb250ZW50JGN0bDAwJHJlbWVtYmVyTG9naW5DaGVja0JveAUkY3RsMDAkQ29udGVudCRjdGwwMCRsb2dpbkltYWdlQnV0dG9u&ctl00%24Content%24ctl04=0&ctl00%24Content%24ctl00%24emailAddressTextBox=EMAILGOESHERE&ctl00%24Content%24ctl00%24passwordTextBox=PASSWORDGOESHERE&ctl00%24Content%24ctl00%24loginImageButton.x=0&ctl00%24Content%24ctl00%24loginImageButton.y=0&ctl00%24_leftColumn%24ctl00=&ctl00%24_header%24txtProductSearch=Item%23%2C+MFG%23+or+Keyword";
string cookieHeader;
System.Net.HttpWebRequest req = (HttpWebRequest)System.Net.WebRequest.Create(formUrl);
req.AllowAutoRedirect = true;
req.ContentType = "application/x-www-form-urlencoded";
req.Method = "POST";
byte[] bytes = Encoding.ASCII.GetBytes(formParams);
req.ContentLength = bytes.Length;
using (Stream os = req.GetRequestStream())
{
os.Write(bytes, 0, bytes.Length);
}
WebResponse resp = req.GetResponse();
StreamReader sr = new StreamReader(resp.GetResponseStream());
String result = sr.ReadToEnd();
MessageBox.Show(result);
cookieHeader = resp.Headers["Set-cookie"];
}
|
|
|
|
|
I would say it has nothing to do with C#. I would expect that because you're doing a POST, the website itself is configured to redirect you.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
So does that mean, I can't work around this.
It's weird. If I post to the url handled by the form.. no login.
If I post to the url redirected to- no login.
?????
-Paul
|
|
|
|
|
What does the actual log in procedure look like to a real user? Does it redirect the user?
|
|
|
|
|
It may mean that, I'm not sure. I mean, I can think of exactly how I would write something to stop what you're doing.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Christian Graus wrote: I can think of exactly how I would write something to stop what you're doing.
Indeed, it does look like some sort of screen scraping application. You wouldn't want to have it running around inside a protected part of the application.
|
|
|
|
|
Paul Calabro wrote: The problem is it gets redirected..
Redirected to where?
By the way, have you tried setting up tools like Fiddler to examine the traffic while browsing in a regular browser to see what is actually happening. That way you can replicate reality, rather than guess at it.
|
|
|
|
|
I get redirected to their site (appears to use SSL)..
And I'm using Live HTTP Headers, a plugin for Firefox.
Here's a screenshot I JUST got back.
It looks like I'm collecting some session info... hmmm
http://i41.tinypic.com/2q9hrab.png[^]
|
|
|
|
|
So, you open a StreamReader by passing it a string (i.e. using the StreamReader(string path) [^] overload. Which means it is interpreting what you sent it as a file path. The string in the error message seen on the screen shot it not a valid file path (it contains session IDs and other gubbins)
|
|
|
|
|
Hahah... it's funny, I just figured that out five minutes ago.
Now I get this...http://i43.tinypic.com/14b79e.png[^]
Looks like we're making progress now.
I think we're close..
Thanks for the help btw..
I really do appreciate it.
|
|
|
|
|
any idea what I should do with this ASP Session details?...
|
|
|
|
|
If you are going to need to make more calls, you will have to store the cookie so that in subsequent calls it knows who you are - otherwise it will think you are not logged in.
|
|
|
|
|
The thing is, I thought I was doing that:
WebResponse resp = req.GetResponse();
cookieHeader = resp.Headers["Set-cookie"];
string pageSource;
string getUrl = "http://www.govconnection.com/IPA/Account/AccountHome.htm";
WebRequest getRequest = WebRequest.Create(getUrl);
getRequest.Headers.Add("Cookie", cookieHeader);
WebResponse getResponse = getRequest.GetResponse();
using (StreamReader sr = new StreamReader(getResponse.GetResponseStream()))
{
pageSource = sr.ReadToEnd();
MessageBox.Show(pageSource);
}
This still doesn't seem to work..
|
|
|
|
|
Hi, no code question this time.
I have noticed that Microsoft Visual C# 2008 Express Edition lacks Inherited form and Inherited User Control.
I need those items for an up coming project as well as I need to create a solution with a C# project and a VB.NET project. I know this can be solved if I bought the software from Microsoft.
There either the Standard version, Professional version and Team suite, see link:
http://www.microsoft.com/visualstudio/en-us/products/default.mspx[^]
Which one should I buy?
|
|
|
|
|
I use professional at work and the standard version at home, all the projects I do outside of my daily work the profesisonal edition tackles without fail.
|
|
|
|
|
|
Visual Studio 2008 Professional Edition
I know nothing , I know nothing ...
|
|
|
|
|