Jindřich Posted October 6, 2020 Report Share Posted October 6, 2020 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 More sharing options...
Paul Henty Posted October 6, 2020 Report Share Posted October 6, 2020 Hi Jindřich, Check that the flight sim is not running 'as administrator'. It's unlikely that your app pool in IIS is running with elevated permissions. Your app and the flight sim (and FSUIPC7 if you are using that) all need to be at the same level. Paul Link to comment Share on other sites More sharing options...
Jindřich Posted October 7, 2020 Author Report Share Posted October 7, 2020 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 More sharing options...
Paul Henty Posted October 7, 2020 Report Share Posted October 7, 2020 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 More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now