I am trying to build an application for Citrix users to end their own session.
I originally coded this myself, but then I found this post:
C# How do I log off a Citrix XenApp User Session?
But I am unable to emulate it.
When I add the using Citrix; references, I am seeing "The type or namespace could not be found."
Do I need to install something for this?
I have searched the internet for this, but all I could find was a download for what is apparently the XenServer-SDK (is this correct?)
Even then, I added the .dlls in Visual Studio, and references like so:
using CookComputing;
using XenServer;
However, I am seeing the same message for these (they are not recognised by Visual Studio).
My original solution does work, but I think I may be able to program a much cleaner solution by using APIs.
Please can someone point me in the right direction? Any help on this is much appreciated!
Many thanks
If you need to stop XenApp session, then you need XenApp SDK (not XenServer). You can download SDK from Citrix site.
Then in your project add references to dlls located in %ProgramFiles%\Citrix\XenApp Server SDK\bin (for XenApp 6.0):
Citrix.Management.Automation.dll
Citrix.XenApp.Sdk.dll
other dlls depending on what you will use
And then add using directives to your .cs file:
using Citrix.Common.Sdk;
using Citrix.XenApp.Sdk;
using Citrix.XenApp.Commands;
using Citrix.Management.Automation;
Related
I am here for help in one of my tasks to integrate IBM Rhapsody models into VS 2019 C++ project.Here is what we are trying to do.
Please note: I am not an expert in IBM Rhapsody Systems Engg tool. My expertise is WPF and .net application
We have generated Rhapsody model for an automatic car dashboard using Rhapsody 8.4. It has general functions like to turn on/off the various lamps(parking,ignition status,gear position,etc.) on dashboard which works fine. Now, we have generated the code in rhapsody as .h and .cpp files. We created an empty C++ project in VS 2019, added files for OXF framework, adaptor files and also the above generated files.
The folder structure as below:
enter image description here
When we compiled this project, we had all kinds of errors related to not being able to find the OXF framework which we were able to fix after adding proper #include paths in header files.
We also have written a wrapper file which will allow us to be able to import the generated dll into another WPF project and use it there.However after removing the path errors,project could not be successfully compiled as we are still looking at one error which says
*
'OMReactive':'class' type redefinition.
Before posting here I have spent 3 weeks researching on google, on IBM rhapsody website and also on stackoverflow.com and none of the solutions provided has worked for me.I know that above error means that somewhere some file in included twice.I have tried using #include guards and also #pragma once, but this has not resolved my issue.
Please if anybody has any idea what is going on here? I have tried to explain and give as much as information as possible.Let me know if any more information is needed. Apologies if I have missed out on any information or unclear about anything.I am at a dead end now and need help. Any ideas, any suggestions? what should I try next? I wonder if the steps I followed to add the rhapsody models into VS 2019 is incorrect or Rhapsody framework not properly included or missing some file somewhere.Please let me know proper steps. IBM Rhapody website does not have exact information on what I am trying to do.
All I want do to is generate a DLL out of the model classes to use in WPF project.
Thanks for reading my question and sorry for being so long.
Thanks..
Asma
Rhapsody can generate code and a makefile. You can then build that from inside Rhapsody (it calls the makefile) You have to select the compiler in your configuration (under Component) You can use VS17 there, it will work for VS19 as well.
If you create a VisualStudio Configuration (right click on your Component and then select Add VS Configuration) Rhapsody will link to a VS project and deploy your files directly.
If that does not work: try using a Willert Framework ( have to be bought)
Yet another option would be to generate code in Java. Rhapsody brings its own JRE. Since you do Systems Engineering you do probably not need to use C or C++.
Walter
Does anyone know if there is a way of automatically installing an extension on DNN using .net ?
It used to be possible using the infamous Install.aspx page, which has been removed for security reasons.
I've tried refactoring the code within Install.aspx so as to automate this, or even run it for a single module, but no luck. I've just got to the point where the zip has gets unpackaged, but what I really want is to know which and how the tables in the Sql Server database get modified.
I would appreciate any pointers on this.
It is quite hard to find all the tables that get updated, as well as the data that gets put into them.
My solution was is to simply call a copy of the installation page, which can be done from, say, a desktop app. For some reason the original Install.aspx won't run if you add it to the DNN installation. Step by step:
Find the Install.aspx and Install.aspx.cs files. They are deleted after the first installation, but you can get them from the original download.
Make a copy of these two files and rename them, e.g. MyInstall.aspx and MyInstall.aspx.cs
In Visual Studio run the DNN installation as a web site, not as a web project.
Now the page MyInstall will work just as the Install did. You can pass the parameters in the url.
Before you call the page, you need to put your module packages into the corresponding folder e.g. for modules install/module of the DNN Installation. To create the module package use Christoc's VS templates.
I have been wrestling with the Android Calendar for a couple of days now and I'm at my wit's end.
Following the instructions found here:
http://docs.xamarin.com/guides/android/user_interface/calendar/
I have begun a new ICS project and added permissions to read and write to the calendar. According to the instructions linked above I should now be able to "interact with calendar data by using the CalendarContract class." However, when I input the first line of example code:
var calendarsUri =CalendarContract.Calendars.ContentUri;
I get an error saying that "The name 'CalendarContract' does not exist in the current context."
I have download sample code for the CalendarDemo located here:
http://docs.xamarin.com/samples/CalendarDemo/
I can open the project, manipulate the code, deploy it to my test device with the modifications that I have made and it works perfectly. The problem is that I cannot seem to get CalendarContract to "exist in my context" if I create a project from scratch. Even adding in the CalendarListActivity.cs into a new project won't work. This leads me to believe that there is something I have to set in Xamarin Studio, not via code and not indicated in their tutorial, that I have yet to find.
What setting or reference do I need to add into a new or existing project in order to use this feature? I've looked everywhere I can think of and cannot find the elusive switch, checkbox, reference or whatever is required. I've burned three days trying to figure this out and I have lost my patience.
I was able to reproduce the error you're having. I created an ICS project in Xamarin Studio and got the same message. I then loaded the solution in Visual Studio and noticed that the CalendarDemo project has a reference to Mono.Android v4.0, but the one created in Xamarin Studio only referenced Mono.Android v2.2 even though I specified Ice Cream Sandwich. That is why you're not able to build.
Changing the Target version in Project Options didn't seem to do anything. A workaround is to add
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
to the .csproj file. See the CalendarDemo project as an example.
BTW: This is on Xamarin Studio v4.2.2 (build 2). I don't normally use Xamarin Studio, so I have never had to deal with this. I'm not sure if it's a bug in XS, but it certainly isn't expected behavior.
Just as a test, I created another project in Xamarin Studio, but this time I just selected the standard Android Application project. Surprisingly, it referenced Mono.Android 4.3.0. So apparently there's a bug in the Android Ice Cream Sandwich project template.
I recommend using the standard Android Application project going forward.
If you are using Xamarin Studio, right-click on CalendarContact and select Resolve. It should give you two options, first will add "using Android.Provider;" to your using statements and the second will append the code to "Android.Provider.CalendarContract.Calendars.ContentUri"
...or just add manually the using statement. :)
You should import this library
> using Android.Provider;
> using Java.Util;
Several years before I started working at this job another developer who is no longer here wrote an application in classic ASP using HTML, vbscript and javascript. This is fine but the problem is that 2 pages were written in C# with an HTML file and a code behind file. There was no solution files for these two pages. They may have been originally created in Visual Studio but they don't exist in it now.
That is important because there is a lot of things that Visual Studio just does for you without even thinking.
My problem is that in these two C# pages I need to get them to reference a DLL. This is a simple task when using Visual Studio. You just add a reference to the project and life is good. But outside of VS nothing seems to work.
I tried putting the dll in the same folder as the pages and then I tried the following:
Using myDLL;
myDLL dll = new myDLL();
myDLL dll = myDLL();
I found some code online that said to create an internal static class and use [DLLImport()] but that didn't work either. It couldn't find the dll or the Entry Point for the dll. I am currently researching how to create an entry point, just in case this is the method to make everything work.
Outside of having to rewrite these pages in vbscript (which I don't have the time to do) I am at a loss.
Has anyone ran into this problem before? Is there something that I can put in the web.Config? Or is this just impossible and I am hosed.
BTW this is all running under the 2.0 .net framework.
If you drop the DLL you want the code to reference into the bin folder of the website, then open the web.config and locate the following section configuration -> system.web -> compilation -> assemblies.
You need to add the display name of the assembly to that list - so that the compiler will reference that assembly during it's late-bound build process.
Now you should be able to use the stuff that's in it on those pages.
If you don't the know the display name of the assembly (typically yourassembly, version=*.*.*.*, Culture=neutral, PublicKeyToken=null for culture-invariant, non-strong-named assemblies) you can open it in a tool like ILSpy (there are others, it's just become my favourite) and it tells you when you select it in it's UI:
sorry for the poor highlighting - jerky hand following far too much coffee
If all the code in that assembly is in a single namespace, also, you can also add a default using to all the .cs or .aspx code in the project by adding that namespace to configuration -> system.web -> pages -> namespaces - making it simpler to use that code in the pages.
I created a VS Solution/Project for my app. I compiled and published it to the web server. When I published it I had it copy all project files.
I ran it and it crashed because it could not find my dll.
I tried adding the lines that Andras mentioned above and it seemed like it was getting me closer but it only changed the errors I was getting.
Then I went into IIS on the web server. I expanded the folder listing under Web Site. I right clicked on the folder that contained my app and made that folder into an application folder.
After I did that everything just worked. So then I thought I would see what happened if I backed out all of the additional code I added to my C# app and the Web.Config file. It still worked. All I needed to do was to make the folder an application folder in IIS and put a Using statement in my C# app and life is wonderful again.
Thanks for all the comments and suggestion. Andras thanks for the link to ILSpy. That is a cool little tool.
Take care,
Robert
I agree with Jon, it sounds like you should try creating a new project for these files. It's always better to leave code better off than you found it. If a new project is not an option for some reason, you should indicate this in your question.
I have created Excel RTD Server, after all implementation completion in debug mode, I am able to run RTD and it is working fine. But when I get the dll in release mode and take it to another system, and register using "regasm.exe" and also provided complete DCOM user access with "everyone" but still using =RTD(), gives me error as #N/A.
I am expecting something I am doing in deployment.
I am stuck here, please help me out.
Thanks
I had similar issue, in my case the office installed on the machine was 64-bit, therefor i had to register the RTD dll using the 64-bit regasm.exe.
Take a look here:
http://social.msdn.microsoft.com/Forums/en/exceldev/thread/7a9e865e-5138-45c0-8f31-ddc148509dbe
good luck.
I had this problem too and it turned out that while in debug mode, VS was able to see my RTDServer, in deploy, windows couldn't because I hadn't explicitly instructed the setup project to do so. To register the rtdsrver.dll as part of a setup project you can do the following:
right click on the setup project: view -> filesystem
in the file system viewer, select the system folder
select your rtdserver.dll and view it's properties
set the Register field to vsdraCOM
Redeploy
Now, excel should be able to see your server assembly in deploy.