RTD Server C#: Getting "N/A" in deployment - c#

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.

Related

Unable to Properly Add References for Citrix to C# Application

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;

The Breakpoint will not currently be hit. No symbols where loaded for this document

Windows 8, VS2013 IIS8,5
I'm trying to connect to a local WEB API by connecting to processes w3pv.exe (Managed (v4.0.30319), 19). The website front end and back end is both running fine on my local IIS. Right after publishing my x86 web API to the local IIS i try to connect to the process, where the break point states "The Breakpoints will not currently be hit. No symbols where loaded for this document". My colleague' can without any problems debug from his local computer.
So far I have.
Reinstalled VS2013.
Checked All Debug Properties
-Project -> build: Define DEBUG constant check / Define TRACE constant check.
Generate serialization assembly = Auto. Advanced build settings -> Debug info = full
Enable Just My Code: Check, Use Managed Compatibility Mode: Check
Enable Edit and Continue : Check
Made sure all Debug mode is set and all project Configured to Active solution platform x86, marked Debug and Build.
Deleted all bin and obj folders, as well as pdb folder in C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files
Reset IIS.
Set Select Code Type to Automatically determine the type of code to debug
Checked in IIS that .Net compilation -> Debug and Enable Prefetch is set to true.
And I still get the same error message. Anyone found anything in addition to this?
I have encountered similar problems many times while training new employees in our very complicated devenv, so here is our internal step by step instruction:
Don't panic
Make sure you attached the debugger to the correct process - you debug the plugin by launching VMS which is external app that has separate config file where the plugin path is stored, so when you change just your configuration Debug/Release it doesn't work.
Make sure you have symbols generated for the assembly Project properties->Build->Advanced->Output section
Make sure the build path hasn't changed. You may have accidentally changed the path and you may only think that the assembly you are trying to debug is the correct one.
Investigating the information you provided this is only help I can think of. My guess is the files you publish are not the files you're debugging locally.
RESOLVED (embarrassed)
A few day's ago, I downloaded the front-end code for the website from the VPN (GIT). I forgot to update the code-behind reference in the App.js file in the front end root. This, of course, referred to the API on the cloud, and not my local API.
This took me way to long to find out. But, at the same time, it's not a solution I've seen so far on the web.
Thanks for all your help.

Request for the permission of type 'System.Web.AspNetHostingPermission"

I am facing a problem for running my website.
I have developed the website and when i hit F5 to view the results i am presented with this error
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.
Exception Details: System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
How can i solve this problem.
This error usually happens if you Map your application folder on Network Drive or open Solution file from UNC Path. somthing like this:
Invalid Example: \\my-server\my-project
Try to open your solution from direct path
Valid Example: C:\Project\MyProject
You can also make change to your privilege of App Pool Identity but it's not recommanded:
Web Server (IIS) > App Pool Identity > Advance Settings > Set Identity as Network Service
the one shot solution worked for me was to set the App Pool Identity(Advance Settings) to Network Service
Try to set "Load User Profile" value of your application pool to "True".
It worked for me.
For what its worth, I found that the AjaxControlKit.dll on the deployed server was blocked. To resolve this, I copied over the dll to a new folder then copied and pasted in the bin folder. I guess .net doesn't like a dll being copied over directly to the web folder
you can run the following command to Grant FullTrust to remote share:
C:\Windows\Microsoft.NET\Framework\v2.0.50727>caspol.exe -m -ag 1 -url
"file:////\yourcomputername\yoursharename*" FullTrust -exclusive on
Hope this helps.
I tried all of the solutions posted here and a number of other places and nothing worked for me. I had my project located on a network drive which worked until I tried to use the AjaxControlToolkit 2.0 in my project. Apparently, something about permissions on the network drive would not allow the controls in the toolkit to run. I moved my project back to my local hard drive and it all started working.
I had this problem as well but have not seen this particular solution mentioned anywhere.
After checking permissions for the IIS user, the user for Impersonation, and granting Full Trust to the application, and still getting the error, I installed Procmon.exe on the server running IIS and noticed that IIS was attempting to access some Framework64 files for the offending website. I inspected the application pool advanced settings and discovered that "enable 32-bit applications" was set to false. Changing this setting to true proved to be the correct action. Life is good.
I face the same problem, then I realised that I was running the solution from a remote folder. Copy the necessary file to the local folder will solve the issue. But make sure that your folder have the full permission
While all of the other answers on this page may be the cause of anyone's problem, the most common one is due to OS security changes in Windows Server 2012 and above. Any file downloaded from the internet is flagged as suspicious by Windows and needs to be manually unblocked before using it in IIS. So if you FTP your code, email it, or transfer it through a cloud provider, it will be flagged and blocked.
The best solution is to use the web publishing facilities built in to Visual Studio or transfer through a network share if you're on a domain, each of which avoid this problem. However, if you must copy your code to another server by one of the means I described above, you should zip everything prior to transfer so you are only left with a single file to unblock. If you unzip before you unblock, then each file will be blocked and multi-selection will not give you the option to unblock.
So finally... to unblock: Right click the file and select Properties. Right there on the first page near the bottom you'll see an Unblock button along with the warning that the file was downloaded from the internet!
If the dll is compiled using this option (Do not merge. Create a separate assembly for each page and control), please make sure the dll is up to date. I faced the error due to aspx file is new one, but dll still using old one.
I found a potential solution that worked on my system and did not require changing to Network Service.
Go to Application Pool -> Advanced Settings -> Process Model -> Load User Profile: True
Source of this answer.
The best way to resolve this issue is Run the Visual Studio as "Administator". Right click on the Visual Studio icon and select "Run as Administrator".
Once you open Visual Studio with Full admin rights, you will be able access the page without any issues.
I have had this error and it seems to be a generic error. As there are several answers to this issue, I am going to add mine. Republishing the website on the remote server seems to fix it for me.

Unable to connect to ASP.Net Development Server issue

I am debugging codeplex simple project. I am using
VSTS 2008
C#
Windows Vista x86 Enterprise.
I have not modified any code of this codeplex project, and just press F5 to run VideoPlayerWeb project.
The current issue I met with is error message --
Unable to connect to ASP.Net Development Server.
Here is my screen snapshots when clicking F5. Any ideas what is wrong?
I had this problem with VS 2010, and it was as simple as terminating the "WebDev.WebServer40.EXE" process. Although the icon was no longer showing in the system tray, the process was still running.
Could be a number of things...try these (check the last one first)...
Disable IPv6
Make sure there isnt an edit in the
hosts file for localhost
Check firewall/virus settings to allow connections to/from
devenv.exe
If you can preview in the browser
make sure the URL in the browser uses
the same port number as the port
number shown in the ASP.NET dev
server taskbar icon.
Try setting a fixed, predefined port
in project properties
I got these from a couple of forums elsewhere, hopefully they can help. Good luck. Let us know what works and some more about your environment (firewall, anti virus etc) can help as well.
Under project settings, try specifying a different port like 64773 for example. I have encountered this issue many times and it has always worked for me.
It cause the already that project port server is running in the current thread. You need to end process using task manager.
Follow below step:
Pres Ctrl+Alt+Delete (Task Manager)
find the asp.net server like
WebDev.WebServer40.exe for VS2010
and press end process.
Now u continue with vs2010 run
button
I went to the project file and changed the development server port to 1504. Well 1504 worked on another project for me, so I went with that. Hope this helps.
I have tried all of the above solutions and others from other websites too but with no luck.
What worked for me, was to rename or delete the applicationhost file:
C:\Users\User\Documents\IISExpress\config\applicationhost < rename or delete.
That is very odd! I hate to suggest something as simple as restarting Visual Studio...but that is what sounds like the best first place to start. Also, check your project settings. As you said that you just downloaded this and tried to run it...perhaps the solution/project is not set up to use the Casini server that is shipped with Visual Studio?
Here are the steps
'Website' Menu in your visual studio ide.
select 'Start Options'
enable 'Use Custom Server' radio button.
Enter any URL you desire similar to 'http://localhost:8010/MyApp'
Note1: you can use any port number not only '8010' but not designated port numbers like 8080(tcpip),25(smtp),21(ftp) etc.,
Note2: you can use any name not only 'MyApp'
This solution works for sure unless your WebDev.Webserver.exe is physically corrupted.
Error
1) Unable to connect Asp.net development server ?
Answer: No way find for that error
Try 1)
Step 1: Select the “Tools->External Tools” menu option in VS or Visual Web Developer. This will allow you to configure and add new menu items to your Tools menu.
Step 2: Click the “Add” button to add a new external tool menu item. Name it “WebServer on Port 8010” (or anything else you want).
Step 3: For the “Command” textbox setting enter this value: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebD ev.WebServer.EXE (note: this points to the
web-server that VS usually automatically runs).
Step 4: For the “Arguments” textbox setting enter this value: /port:8010 /path:$(ProjectDir) (or any port you like)
Step 5: Select the “Use Output Window” checkbox (this will prevent the command-shell window from popping up.
Once you hit apply and ok you will now have a new menu item in your “Tools” menu called “WebServer on Port 8010”. You can now select any web project in your solution
and then choose this menu option to launch a web-server that has a root site on port 8010 (or whatever other port you want) for the project.
You can then connect to this site in a browser by simply saying http://localhost:8010/. All root based references will work fine.
Step 6: The last step is to configure your web project to automatically reference this web-server when you run or debug a site instead of launching the built-in
web-server itself. To-do this, select your web-project in the solution explorer, right click and select “property pages”. Select the “start options” setting on the left, and
under server change the radio button value from the default (which is use built-in webserver) to instead be “Use custom server”. Then set the Base URL value to be:
http://localhost:8010/
Obviously I don't know if this is the problem you had but definitely it is something similar, essentially the problem should be that the same port used by your
Development Server is not available because it is already used by another web server.
Try 2)
Here are the steps
1. 'Website' Menu in your visual studio ide.
2. select 'Start Options'
3. enable 'Use Custom Server' radio button.
4. Enter any URL you desire similar to 'http://localhost:8010/MyApp'
Note1: you can use any port number not only '8010' but not designated port numbers like 8080(tcpip),25(smtp),21(ftp) etc.,
Note2: you can use any name not only 'MyApp'
This solution works for sure unless your WebDev.Webserver.exe is physically corrupted.
Both of not worked after that Windows repair option remain
My solution was to turn off Internet Connection Sharing on my wireless adapter, after which it immediately worked. I made no other change. I suspect ICS's DHCP server was interfering.
Try commenting out the following line, if it exists, in your hosts file (%windir%\System32\drivers\etc\hosts):
::1 localhost
This worked for me using Visual Studio 2008 SP1 on Vista Ultimate x64 SP2.
I got this problem a couple of times and done different things to fix it. When I got it this time all I did to stop getting "unable to connect to asp..." error, was rename the web app folder directory from xpCal to xpCal2. I also tried moving the web app directory to a different directory from C:users\<me>\desktop\ to C:\users\<me>\desktop\new folder and it also worked.
I don't know why it worked, does VS 2010 keep information about web apps seperate from web apps folder.
In my case, when I had the ASP.NET Development Server crash, one thing that worked was to change the port for the project.
I suspect what happened was when the web server crashed it did not release a lock on the port. Even though it was not running in Task Manager, something was blocking a new instance of the web server from starting again on the original port. Changing the port was a decent enough work around. I could have rebooted, but who has time for that, right?
Details: Windows 7 x64, VS2010, .NET Framework 4.0, ASP.NET web site using the built in web server to VS2010.
BTW, I would be a little cautious with replacing the WebDev.WebServerServer.EXE as suggested in other posts. If that file has been corrupted then you have bigger problems with your OS.
hi
Just change the asp.netweb development server port from automatic to a specific port
e.g 8010
That's what worked for me
1) not reflecting HttpContext in class file ?
Answer:-Most of the time when using this syntax in class file is not working
we have to add reference then it work in class file
example using system.web write this syntax in class file
System.Web.HttpContext(HttpContext is not reflecting )
after that i add refrence system web than it reflect
None of the above solutions worked for me, but I did find one that worked: opening up the Administrative Tools/Services window and stopping the "WebClient" service. It's something of a pain to have to disable it when trying to work with my code, but it's easier than the logging off and back on I used to have to do.
--Problem Definition
------ whenever we debug our project (either by pressing ctrl+f5 or only f5) the first .exe which is called by VS is called WebDev.WebServer.EXE which got corrupted may be n number of reasons
--Solution
------ We need to replace this file
------Step 1 ---
go location C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0
You will find this file
-------Step 2 ---
download WebDev.WebServer.rar file from
http://www.2shared.com/file/11532086/a7f9858a/WebDevWebServer.html
-------Step 3 ---
NOTE : You will need password for extraction this downloaded .rar file
Password : optimusprime
------ Step 4 ---
Copy the downloaded WebDev.WebServer.EXE file and replace in this below path
"C:\Program Files\Common Files\Microsoft Shared\DevServer\9.0
"
--------step 5------
run the program
Go to Run >> type >> cmd >> type
taskkill /IM webdev.webserver20.exe
and then try to re run the program
In my case I was using Windows 8 and Windows Firewall was blocking WebDev.WebServer.EXE
So I went to the settings of Windows Firewall > Allow an app through Windows Firewall > Add new
and browse to C:\Program Files (x86)\Common Files\Microsoft Shared\DevServer\11.0
Then select WebDev.WebServer to allow.
For some poor souls out there starting using TypeMock on ASP.NET unit tests like me, you need to disable it in Visual Studio to avoid this error: In Tools->Add-in Manager, untick the boxes for TypeMock Isolator. I guess you need to switch this back on for your unit tests.

Visual Web Developer Express with SP1 crashing when switching to design mode

I've just recently upgraded to using Visual Studio express editions with service pack 1. Previously I was using the express editions minus the service pack. The IDE for C++ and C# run fine for me but when running the Visual Web Developer IDE I get a crash when trying to switch to design mode on any page I attempt it on.
I have been able to track down the particular line and module this crash is occurring in. Its from the file afxcrit.cpp from the DLL fpacutl.dll. The relevant function where the crash is occurring is as follows...
void AFXAPI AfxLockGlobals(int nLockType)
{
ENSURE((UINT)nLockType < CRIT_MAX);
// intialize global state, if necessary
if (!_afxCriticalInit)
{
AfxCriticalInit();
ASSERT(_afxCriticalInit);
}
// initialize specific resource if necessary
if (!_afxLockInit[nLockType])
{
EnterCriticalSection(&_afxLockInitLock);
if (!_afxLockInit[nLockType])
{
InitializeCriticalSection(&_afxResourceLock[nLockType]);
VERIFY(++_afxLockInit[nLockType]);
}
LeaveCriticalSection(&_afxLockInitLock);
}
// lock specific resource
EnterCriticalSection(&_afxResourceLock[nLockType]); // <--- CRASH HERE !!!
#ifdef _DEBUG
ASSERT(++_afxResourceLocked[nLockType] > 0);
#endif
}
Any help/thoughts is greatly appreciated.
Well the computer has lost in the end as it always does! I found this thread to be a big help as there were a bunch of people posting with very similar issues to mine...
http://forums.asp.net/t/1186584.aspx?PageIndex=1
On the first page there is the following suggestion...
Make sure Microsoft Web Authoring
Component appears in Control Panel. If
it does, uninstall it. The go to
WCU\WebToolsCore\en-us in VS DVD and
run WebToolsCore.exe. The setup does
not have UI, give it about 10 minutes
to finish. Verify that Web Authoring
Component appears in Control Panel.
Try go to DV again.
I followed through with this suggestion and uninstalled the "Microsoft Web Authoring Component" however I couldn't find the "WebToolsCore" folder in the express installation disc as noted in the details. I did however find the folder "X:\VWDExpress\WCU\WebDesignerCore". Figuring this is pretty much the same thing I installed WebDesignerCore.EXE and WebDesignerCore_KB945140.EXE which are both in the the WebDesignerCore folder. Its a silent install so nothing looks immediately to have taken effect but when I headed into Visual Web Developer and switched to design mode success! It works!
Is your installation customised in anyway? Do you have VS add-ins, etc. installed? If so, try removing them one by one and/or restore all app settings back to their defaults. I'm not so familiar with the express editions so I'm not sure what kind of customisations they support.
If all else fails, I hate to say it but...
1) make sure all your work is safely saved seperately from the application folders and/or is backed up
2) uninstall the app (if uninstall options are given, use the most complete one, e.g. delete all files, settings, preferences, etc.)
3) reboot
4) run CCleaner (both file deletion and registry fixer)
5) reboot
6) re-install
That is my tried and tested fall back method for when simply 'all else fails'. It usually works unless there is a genuine bug in the software.
You don't actually have to remove the Microsoft Web Authoring Component. A simple repair from the add/remove programs dialog works just fine.

Categories

Resources