fbpx
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Xporting an Internet Server based program: Object reference not set..

Xporting an Internet Server based program: Object reference not set.. 1 week 6 days ago #10565

  ic2's Avatar Topic Author ic2 Offline Posts: 540
We are Xporting an Internet Server based program. There is no VO.dll for that SDK so I included a new project where I plan to add any missing code from the SDK source of VO. Not sure if this is the right approach.

Now there's something odd. I called the project SDK and I added Class HTTPCGIContext Inherit HTTPContextAbstract and Class HTTPContextAbstract and within the latter Method GetParamValue(cParam As String, n As Dword, a As Array, lNil As Logic) As String Pascal Class HTTPContextAbstract. When I rebuild that project the SDK.DLL is created successfully.

Now I rebuild the whole project. This gives the error:
Severity Code Description Project File Line Source Suppression State Tool
Error XS0246 The type or namespace name 'HTTPCGIContext' could not be found (are you missing a using directive or an assembly reference?)
Ok, makes sense, the SDK project was not included in one of the projects inheriting from HTTPCGIContext from the SDK project. So I select Add Reference and double click on SDK (from tab Projects).

I then get an error box: Object reference not set to an instance of an object.

How can I solve this?

Dick

Please Log in or Create an account to join the conversation.

Last edit: by ic2.

Xporting an Internet Server based program: Object reference not set.. 1 week 6 days ago #10566

  Chris's Avatar Chris Offline Posts: 1341
Hi Dick,

Which build are you using? There was a similar problem some time ago but was fixed in the last couple builds.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Xporting an Internet Server based program: Object reference not set.. 1 week 6 days ago #10567

  ic2's Avatar Topic Author ic2 Offline Posts: 540
Hello Chris,


That is the XSharpSetup2RC2Fox to which I reverted today (June 14)

Dick

Please Log in or Create an account to join the conversation.

Xporting an Internet Server based program: Object reference not set.. 1 week 6 days ago #10568

  Chris's Avatar Chris Offline Posts: 1341
Hi Dick,

I am pretty sure the problem was fixed after that. You will need to use the later builds anwyay at some point, please answer my questions about the issue you have in the latest one, so we can try and track down the problem.
XSharp Development Team
chris(at)xsharp.eu

Please Log in or Create an account to join the conversation.

Xporting an Internet Server based program: Object reference not set.. 1 week 5 days ago #10597

  ic2's Avatar Topic Author ic2 Offline Posts: 540
Helle Chris,

It is fixed indeed in the current run (and I am sure it must have worked in most older versions too because including libs/projects a pretty basic thing :P

Kees tried it on his system with the latest release but until the issue with the ADS dbf write is solved I will have to stick to the RC2 and pause the Xporting work .

Dick

Please Log in or Create an account to join the conversation.

Xporting an Internet Server based program: Object reference not set.. 1 week 5 days ago #10599

  wriedmann's Avatar wriedmann Away Posts: 1745
Hi Dick,

do you have tried to xport the Internet Server SDK with the sources you have from VO?
I have tried it now as it should work, but it seems that X# does not accept type pointers to functions like this here:
member pSetHeader as SetHeader ptr
where
function SetHeader(pfc as _WINHTTP_FILTER_CONTEXT, lpszName as psz,lpszValue as psz) as logic pascal
	return .T.
But I'm sure Chris or Robert can help here.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

Xporting an Internet Server based program: Object reference not set.. 1 week 5 days ago #10600

  ic2's Avatar Topic Author ic2 Offline Posts: 540
Hello Wolfgang,

Basically what we want to do is to modernize our CGI .exe Webprogram to eventually a ASPX based X#/C# DLL. First step is to see if the current code can convert. This allows us just to remove whatever is in the Internet SDK. For example: MySQL access relies on ancient ODBC and it has proven to be a problem to get that configured when running the program on another webserver. Then we will also replace other methods like GetParamValue. For all this there are much better .Net alternatives. But we want to make sure that we can compile the rest of the code and for that we add the absolute minimum of Internet SDK code in a separate project . If it compiles to run we will replace every single call and can then remove this SDK methods and classes again.

Dick

Please Log in or Create an account to join the conversation.

Xporting an Internet Server based program: Object reference not set.. 1 week 5 days ago #10601

  wriedmann's Avatar wriedmann Away Posts: 1745
Hi Dick,

this was only a thought.
Initially, in my migrations I had planned to change such things, but in the meantime I have changed my plans.
I will try to maintain the VO code whenever possible and rewrite only the parts that I need to change.
Old technolgies will only be replaced my newer ones when the migration is complete and the X# version of my software is running.
Otherwise the migration may be too much work.....
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy

www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

  • Page:
  • 1