Saturday, July 11, 2009

[DotNetDevelopment] Re: new to dot net programming

Every one have a sugessions if you ask one. :) ............... Select one is like to select a fish from a pond. select which fish you want


 
On Sat, Jul 11, 2009 at 12:51 PM, Dineshverma <vermadenish@gmail.com> wrote:

Hi Pallavi.
You can start .NET from Initial
dont use Internet for this .. Use only Books.
-Brought Any .NET Framework 2.0 Book
- Brought C# by E Balagurusamy

Read both
Then I will tell  u next step.

And Welcome in .NET World..............

Be online and talk with me .

[DotNetDevelopment] COM problem - - Retrieving the COM class factory for component

We are working with asp.net 1.1, vb.net and using a 3rd party dll for
CC processing. To use this dll, I had to install WSE 3.0. All is good
locally and it is working in testing server, but it didnt work when I
uploaded to the production server. I asked my madam to install WSE 3.0
on the server so that I could use the dll. They installed it and we
get the following error:


Retrieving the COM class factory for component with CLSID
{698BFD43-76AA-4D13-98FE-5BE9FF5E05B8} failed due to the following
error: 80040154.
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException:
Retrieving the COM class factory for component with CLSID
{698BFD43-76AA-4D13-98FE-5BE9FF5E05B8} failed due to the following
error: 80040154.

Source Error:

An unhandled exception was generated during the execution of the
current web request. Information regarding the origin and location of
the exception can be identified using the exception stack trace
below.

Stack Trace:

[COMException (0x80040154): Retrieving the COM class factory for
component with CLSID {698BFD43-76AA-4D13-98FE-5BE9FF5E05B8} failed due
to the following error: 80040154.]
CyberSource.WSSecurity.Signature..cctor() +10

[TypeInitializationException: The type initializer for
'CyberSource.WSSecurity.Signature' threw an exception.]
CyberSource.WSSecurity.Signature.get_Version() +0
CyberSource.Xml.Client.SetVersionInformation(XmlDocument request,
String nspace) +152
CyberSource.Xml.Client.RunTransaction(XmlDocument request) +92
Education4PMTI.PMTIpaymentgateway.ProcessRequest(Page page, String
merchantrefcode1, String firstname1, String street11, String City1,
String Postcode1, String phone1, String email1, String Country1,
String state1, String amount1, String Creditcardnumber1, String
expirationmonth1, String expirationyear1, String cvNumber1) +427
Education4PMTI.classregistration.imgSubmit_Click(Object sender,
ImageClickEventArgs e) +2138
System.Web.UI.WebControls.ImageButton.OnClick(ImageClickEventArgs
e) +108
System.Web.UI.WebControls.ImageButton.RaisePostBackEvent(String
eventArgument) +118

System.Web.UI.WebControls.ImageButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent
(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+36
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1565


let me know Any ideas? please.

Thanks in Advance

Regards,
Anjeswar.

[DotNetDevelopment] second degree equation

Hi all,
i need to change this code to use struct for all the types making the
equation and the solution
any ideas?
class SecondDegreeEquationSolution
{
double[] solutions;

public SecondDegreeEquationSolution()
{
solutions = new double[0];
}
public SecondDegreeEquationSolution(double _solution)
{
solutions = new double[1];
solutions[0] = _solution;
}
public SecondDegreeEquationSolution(double _solution1,double
_solution2)
{
solutions = new double[2];
solutions[0] = _solution1;
solutions[1] = _solution2;
}
public int NumberOfSolutions
{
get
{
return solutions.Length;
}
}
public double this[int n]
{
get
{
if(solutions.Length == 1 && n == 1)
return (solutions[0]);
else if(solutions.Length == 2 && (n == 1 || n == 2))
return (solutions[n-1]);
else return double.NaN;
}
}
}
class SecondDegreeEquationSolver
{
public static SecondDegreeEquationSolution Solve
(SecondDegreeEquation eq)
{
if(eq.A == 0)
{
return new SecondDegreeEquationSolution(-eq.C/eq.B);
}
double d = eq.B * eq.B - 4 * eq.A * eq.C;
if(d<0)
return new SecondDegreeEquationSolution();
else if(d==0)
return new SecondDegreeEquationSolution(-eq.B/2*(eq.A));
else return new SecondDegreeEquationSolution((-eq.B+Math.Sqrt(d))/
2*eq.A,(-eq.B-Math.Sqrt(d))/2*eq.A );
}
}

class SecondDegreeEquation
{
double a,b,c;
public SecondDegreeEquation(double _a,double _b,double _c)
{
a = _a;
b = _b;
c = _c;
}
public double A
{
set
{
a = value;
}
get
{
return a;
}
}
public double B
{
set
{
b = value;
}
get
{
return b;
}
}
public double C
{
set
{
c = value;
}
get
{
return c;
}
}
}
class MainClass
{
static void Main(string[] args)
{
string strEndProgram;
Console.Out.WriteLine("This program solves equation of the form [ax²
+bx+c=0]");
bool endProgram = false;
do
{
Console.Out.Write("Please enter the value of a:");
double a = double.Parse(Console.In.ReadLine());
Console.Out.Write("Please enter the value of b:");
double b = double.Parse(Console.In.ReadLine());
Console.Out.Write("Please enter the value of c:");
double c = double.Parse(Console.In.ReadLine());

SecondDegreeEquation eq = new SecondDegreeEquation(a,b,c);
SecondDegreeEquationSolution solutions =
SecondDegreeEquationSolver.Solve(eq);
switch(solutions.NumberOfSolutions)
{
case 0:
System.Console.WriteLine("No Solution");
break;
case 1:
Console.Out.WriteLine("The Solution is:{0}",solutions[1]);
break;
case 2:
Console.Out.WriteLine("The Solution is:{0},{1}",solutions
[1],solutions[2] );
break;
}
do
{
Console.Out.Write("Would you like to solve another equation?(y/
n)");
strEndProgram = Console.In.ReadLine();
}
while(strEndProgram!="n" && strEndProgram!="y");
if(strEndProgram.StartsWith("n"))
endProgram = true;
}
while(!endProgram);
}
}

[DotNetDevelopment] Re: Click a button using Javascript

you can have more than one form on a page in .aspx files also, but
they must not be runat="server"

[DotNetDevelopment] Re: new to dot net programming

Hi Pallavi.
You can start .NET from Initial
dont use Internet for this .. Use only Books.
-Brought Any .NET Framework 2.0 Book
- Brought C# by E Balagurusamy

Read both
Then I will tell u next step.

And Welcome in .NET World..............

Be online and talk with me .

[DotNetDevelopment] Re: new to dot net programming

I'm guessing it's one of these:

- Organophosphate Poisoning
- Ovine Progressive Pneumonia
- Other People's Privates
- Organization and Personnel Problem

I sure hope it's the third option, lol! Seems relatively harmless. :P

On Jul 10, 5:28 pm, Brandon Betances <bbetan...@gmail.com> wrote:
> I'm down with OPP. Yea, you know me. (I REALLY hope someone gets that joke!)
>
>
>

[DotNetDevelopment] Re: WinSock Http Programming

Winsock doesn't render images unlike webbrowser, saving bandwith.

Just one of the many bonuses. However, i could use inet but I'm not
sure completely sure if it supports such as storing cookies for each
individual component.

I'm not sure if that made sense or not.

-Andrew

On Jul 10, 9:04 am, Peter Smith <psmith.w...@gmail.com> wrote:
> Probably no replies because the question is rather vague, and nobody's
> had the time or desire to sit down and take you through a
> self-discovery process to teach you to write less vague questions, or
> even just make assumptions...though, the latter tends to be rather
> ego-damaging and avoided by many. There's another reason, too, but
> we'll get to that one at the end of this. :)
>
> Me, I've got plenty of ego to spare, so I'll make some assumptions. :)
>
> So, you sit down at your computer, log in to Windows, and there's a
> single icon on the screen. You click it, and a message box pops up
> 'You have logged into the SlashDot Forums', where I'm assuming
> x='SlashDot'. I'm not sure how you'd log into a script, so I'll ignore
> that part.
>
> Inside the box is code in VB 2008 that 1) usesWinsock, and 2)
> actually connects to a remote site and transmits data such that it's
> not just faking the login. Not really sure if you want to do anything
> ELSE after logging in, so, we'll assume you just want to log in, and
> be done with it. Perhaps it's a forum where if you don't log in every
> day, you lose status. (like logging into the Where's George site
> refreshes your score).
>
> At this point, I'd normally just stop, because I avoid VB, being an
> adult and all. But, okay, so you want/need/have to use VB 2008. What
> other assumptions will I make? Oh, let's assume that the forum you
> want to connect to is web-based; I'm guessing most people wouldn't be
> logging into a mail server, or software on their system, or an old BBS
> type system. So, you've figured out a URL that gives you the login
> page.
>
> At this point, I go to a search engine (let's choose Dogpile.com) and
> type: "VB 2008winsocklogging into website". This looks promising:http://www.bigresource.com/VB-Winsock-Syntax-To-request-a-website-wit...
> as doeshttp://www.computing.net/answers/programming/winsock-post-help-visual...
>
> Lots of people asking lots ofwinsockquestions. But...
>
> WHY do you want to useWinsock? If we take 'winsock' out of the
> equation, we get really nice answers, likehttp://www.dreamincode.net/forums/showtopic79876.htm(with code below)
> using... hey, using .NET stuff! And that's what *this* is, a .NET
> Development area....
>
> (add a webbrowser to your form)
> Webbrowser1.Navigate("www.yourhomepage.com/input.php")
>
> If Webbrowser1.ReadyState = WebBrowserReadyState.Complete
>         webBrowser1.Document.All("txtUsername").SetAttribute("value",
> "Username")
>         webBrowser1.Document.All("txtPassword").SetAttribute("value",
> "mypass01")
> ' This fills the controls with your values
> ' But you need the name of the Control for the parameter
> ..Document.all(name of the control)...
>
>         webBrowser1.Document.Forms(0).InvokeMember("submit")
> 'This calls the submit
>
> And THERE'S the crux of the answer.Winsockprogramming is NOT .NET
> programming. It's 'we don't HAVE .NET' programming. In fact, there'shttp://www.astahost.com/info.php/Write-Code-Winsock-Net_t9819.html
> which is the sort of thing you found System.Net.TCPIP in. But you have
> no need to use it, if you're just trying to access web hosts.

Friday, July 10, 2009

[DotNetDevelopment] Sorting Reports

Please could anyone explain to me how I could make my report show rows
based on a particular criteria. Just like I can user the datareader to
read based on a particular criteria which I will enter into the select
statement.

I will be so glad to see your reponses.

Thank you.

[DotNetDevelopment] C# with dxf file format

I want to read and view dxf file using C#. I searched on the internet
and found some result in codeproject.com but that working not well. So
I found some dll file to support this but it is of commercial .
Someone please help me or give some examples about this?
Thank you very much.

[DotNetDevelopment] Re: WinSock Http Programming

Probably no replies because the question is rather vague, and nobody's
had the time or desire to sit down and take you through a
self-discovery process to teach you to write less vague questions, or
even just make assumptions...though, the latter tends to be rather
ego-damaging and avoided by many. There's another reason, too, but
we'll get to that one at the end of this. :)

Me, I've got plenty of ego to spare, so I'll make some assumptions. :)

So, you sit down at your computer, log in to Windows, and there's a
single icon on the screen. You click it, and a message box pops up
'You have logged into the SlashDot Forums', where I'm assuming
x='SlashDot'. I'm not sure how you'd log into a script, so I'll ignore
that part.

Inside the box is code in VB 2008 that 1) uses Winsock, and 2)
actually connects to a remote site and transmits data such that it's
not just faking the login. Not really sure if you want to do anything
ELSE after logging in, so, we'll assume you just want to log in, and
be done with it. Perhaps it's a forum where if you don't log in every
day, you lose status. (like logging into the Where's George site
refreshes your score).

At this point, I'd normally just stop, because I avoid VB, being an
adult and all. But, okay, so you want/need/have to use VB 2008. What
other assumptions will I make? Oh, let's assume that the forum you
want to connect to is web-based; I'm guessing most people wouldn't be
logging into a mail server, or software on their system, or an old BBS
type system. So, you've figured out a URL that gives you the login
page.

At this point, I go to a search engine (let's choose Dogpile.com) and
type: "VB 2008 winsock logging into website". This looks promising:
http://www.bigresource.com/VB-Winsock-Syntax-To-request-a-website-with-the-Winsock-control--p9vx71RB9B.html;
as does http://www.computing.net/answers/programming/winsock-post-help-visual-basic/11968.html

Lots of people asking lots of winsock questions. But...

WHY do you want to use Winsock? If we take 'winsock' out of the
equation, we get really nice answers, like
http://www.dreamincode.net/forums/showtopic79876.htm (with code below)
using... hey, using .NET stuff! And that's what *this* is, a .NET
Development area....

(add a webbrowser to your form)
Webbrowser1.Navigate("www.yourhomepage.com/input.php")

If Webbrowser1.ReadyState = WebBrowserReadyState.Complete
webBrowser1.Document.All("txtUsername").SetAttribute("value",
"Username")
webBrowser1.Document.All("txtPassword").SetAttribute("value",
"mypass01")
' This fills the controls with your values
' But you need the name of the Control for the parameter
..Document.all(name of the control)...

webBrowser1.Document.Forms(0).InvokeMember("submit")
'This calls the submit

And THERE'S the crux of the answer. Winsock programming is NOT .NET
programming. It's 'we don't HAVE .NET' programming. In fact, there's
http://www.astahost.com/info.php/Write-Code-Winsock-Net_t9819.html
which is the sort of thing you found System.Net.TCPIP in. But you have
no need to use it, if you're just trying to access web hosts.