Jump to content
The simFlight Network Forums

FSUIPC and ASP.NET (IIS)


Jindřich
 Share

Recommended Posts

Hi, did someone ever try to use the FSUIPC Client dll under IIS environment?

I like to have simulator control panel accessible via intranet web site, the web server is running on the same PC as FSUIPC.
I wrote a simple button, that - when running in debug mode in VS using the IISExpress is working as expected, but when I deploy the site to IIS, it throws an exception cannot open connection to FSUIPC (FSUIPC Error #2: FSUIPC_ERR_NOFS).

Thanks for any help.
Jindřich

Link to comment
Share on other sites

Well, I was unable to run this successfully under IIS, but it works under Abyss web server.

I found a problem anyways. (I decompile your project, just to find the error, hope it is ok). The environment somehow remembers the dataGroups collection, and when multiple Process() are called, the dataGroups is filled again with the same offsets until it reaches the MaximumDataSize and throws exception. I added dataGroups.Clear() method to the end of FSUIPCConnection.Close(), while calling the Close method anytime the work with FSUIPC is done and it's now working perfectly.

Would you somehow clear the collection when Close is called or add the posibility to clear the stuff any other way and update in NuGet?
Thanks, Jindřich

Link to comment
Share on other sites

Hi Jindřich,

The dataGroups are meant to be remembered; that's how the DLL is designed to work. You declare offsets in various groups once (usually when the app starts), then you process the groups when you need to as your app is running.

It sounds like you're declaring your offsets more than once in the lifetime of the application. If your application has a predefined set of groups that never change, and all your web users are given the same data, then you should really just declare the offsets once when the application starts up.

If each user can request different offsets, and those offsets are created specifically for that user request, then you should put them in a group named uniquely for that request. Then, after processing it you can delete it using DeleteGroup:

FSUIPCConnection.DeleteGroup("MyOffsets");
Quote

Would you somehow clear the collection when Close

I can't do that. Offsets and groups are meant to survive if the connection is closed (or lost) and reopened.

Quote

 or add the posibility to clear the stuff any other way

You can delete individual groups as shown above.

I suspect the problem is that your application keeps declaring offsets over and over again. I think you need to look at where and when the offsets are being declared and either stop that happening and just declare the offsets/groups once, or delete the groups you create.

Paul

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.