We have deployed a AX2012 model that we developed in our dev environment into a production environment.
The model consists of a C# project, for which the settings are set to deploy to client and server.
After deployment it seems that the .NET assembly for the C# project is generated for the client vsassemblies folder (under c:\user\appdata\microsoft....) but it doesn't generate on the AOS server under C:\program files\Dynamics AX...\Server\bin\Vsassemblies folder".
The hot swapping setting is on. Is there a way to force the regeneration? Even restarting the AOS service doesn't recreate the assembly.
should be something like this:
http://msdn.microsoft.com/en-us/library/gg889192.aspx
"An assembly is copied to the client under these circumstances:
When a call is made from the client to managed code that is contained in the assembly.
When you access IntelliSense (at design time).
When you compile code that references the managed code assembly."
also, there are indications some of the documentation may be incorrect, and a bit of discussion about the server bit:
http://daxmusings.blogspot.com/2011/09/ax-2012-net-assembly-deployment.html
We´ve got the same and many other Problems with .Net Projects in Microsoft Dynamics AX 2012.
Do you use Microsoft Team Foundation Server 2010 and tried to check in and check out those Projects? The Solution Files will have a write lock, sometimes it can´t find the project to open it in Visual Studio... and so on...
I think the Developer Team from Microsoft Dynamics AX have a lot of work. Ah... I forget... Try to rename an already checked in AOT element. First it all looks good. But if another developer get latest changes. "There is already an object with origin id"... Great... :-/
It is really hard to manage a team with greater than 10 developers and many many problems.
Related
Once a week I get the new version of .net assembly which I need to deploy to our Axapta 2012 installation. I don't want to copy this dll to axapta client folder on each computer. So I am searching the way to deploy it to AOS and hope it will deploy on each client automatically.
I have found many solution (this is one of them), but all of them works only if I have the source code of this assembly. I don't have. And I can not to 'Add VS project to AOT' and deploy it using VS add-ins.
Is there any way to deploy .net assembly (as compiled DLL) from AOS to each client ?
If you cannot do it using the "Add VS projection to AOT" method, you can use the SysFileDeployment class. This is demonstrated in Joris DG his blogpost here.
On msdn the description of the SysFileDeploymentclass is as follows:
The SysFileDeployment class is used for deploying files from the server to the clients.
On msdn it is also explained how you need to do this.Basically all you need to do is extend this class and point to the files you need to deploy (in your case a dll). You will also have to change the build number of you solution to trigger the deployment.
You can also deploy dll's by adding them to the GAC, as demonstrated here:
Axilicious: AX2012 DLL Deployment and how AX binds DLL’s at runtime
To summarize main differences are:
Using the visual studio properties: it is deployed to a folder specific to that user (so a different folder for each user) at the moment it is needed
Using SysFileDeployment: it is copied to the client bin folder, a restart of the client is needed (possibly problems when on citrix/terminal services, like Joris suggests in the link you provided?)
GAC: DLL's are stored in the Global Assembly Cache and different versions are stored but you need to provide a mechanism of deploying them yourself
Personally I would try the SysFileDeployment method as it's the standard method MS provide. If you have trouble, you might receive support.
I'm having a lot of issues with the Visual Studio 2012 Publish feature.
I am looking an easy way to publish my Asp.Net MVC 4 application. Today I have my development machine and a web server. Every time I update the application, I have to manually copy and paste the files I want. This is a very cumbersome work.
I have tried VS2012 publish tool and encountered so many problems.
I am properly configuring ftp to work on passive mode but VS2012 keeps saying that passive mode is not activated.
Since there is no "checkbox" to alternate from passive mode to normal mode, I had to modify the xml file no set it to not operate with passive mode.
The deployment now succeeds, and now I'm receiving the following error:
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files\root\ee6c89b7\bf969ee8\App_Web_crjs1ytd.16.cs(33,0):
Error CS0234: 'The type or namespace name 'sistema_DocType' does not exist in the namespace 'gedaiapp.Models' (are you missing an assembly reference?)
There is nothing wrong with my application on my local machine and I am able to build it and run in the web server when I copy/paste the files, I do now understand why it doesn't work when I use the publish feature.
I have already tried deleting all files in the temp folder, cleaned the entire solution and project and rebuilt all.
Sorry to hear that you guys are having issues. You are correct Visual Studio does not support SFTP, but we do support FTPS.
We have an item on our uservoice site for SFTP support, but the vote count is currently very low (just has 6 votes). If you guys are interested in this support if you could vote on the item this will help me prioritize this so that we can investigate supporting this.
If you have any other feedback that you'd like to share with me regarding publishing please feel free to email me directly at sayedha[at]{MicrosoftDOTcom}.
This question is not easy to answer because it is not know if this is an internal corporate environment or a small environment and you're just copying a few files over the internet to a single server.
If you're in an internal corporate environment and have a large number of files/servers you need to copy to, you may want to look at replication (3rd party software or homegrown application).
I'm with you in that the publish tool is not up to current standards. My challenge with this tool is the lack of Secure FTP options for this application. This should be standard with any version of Visual Studio.
I'm currently using the IIS SFTP and Filezilla (SFTP) for my transport needs as the alternative to the lack of encrypted features in Visual Studio.
I'm trying to run a test version of a web using the File System (i.e. the "Cassini" web server built-in to Visual Studio 2005) rather than (IIS 5.1 on my Win XP dev PC). This web is a hodge-podge of classic ASP files written years ago and some new development in ASP.NET (VB.NET).
How can I get past this error message as it tries to go to /TestWeb/default.asp? -
Server Error in '/TestWeb' Application.
This type of page is not served.
Description: The type of page you have requested is not served because it has been explicitly forbidden. The extension '.asp' may be incorrect. Please review the URL below and make sure that it is spelled correctly.
Requested URL: /TestWeb/default.asp
Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082
Things I have checked and previously encountered trying to get this mess working:
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config
(has nothing for *.asp nor
HttpForbiddenHandler so nothing to
comment out).
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config
(has nothing for *.asp)
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\CONFIG\machine.config
(had a HTTPForbiddenHandler for
*.asp but I commented it out as per other postings advice; seemed to
have no effect for me though).
To get past an earlier error
("Request for the permission of type
'System.Web.AspNetHostingPermission'
failed"), I had to go to
"Administrative Tools > MS .Net
Framework 2.0 Configuration > My
Computer> Runtime Security Policy >
change Local Intranet to Full Trust.
To get past an earlier error ("the
network bios command limit has been
reached") I had to "enable a hot
fix" by adding the following DWORD
value at the following registry key:
HKLM\Software\Microsoft\ASP.NET\FCNMode
and set the value to 1 (per MS KB
Article 911272).
This whole web has been placed on a file server in our LAN and from my desktop VStudio2005 views it via the mapped drive letter (e.g. V:\SVNwork\myFolder\TestWeb)
Visual Studio 2005 models this as a "web site" (not a "web application project").
The remainder of this post describes some background about why I am trying this:
We tend to recreate the web site on our dev PC's which run IIS 5.1 on Win XP. Movement of new stuff into production can be awkward using WinDiff and copying files as needed.
I'm trying to implement source control over this work. I've had a heck of a time trying to configure Visual SourceSafe 2005 and local IIS to work together smoothly (interestingly, I had pretty good luck putting "web application projects" under VSS2005 so I think it's related to the awkwardness of the ASP.NET 2.0 "site" model and VSS).
Anyway, I've moved a development version of this classic ASP and ASP.NET to a common file server in our LAN. Before placing this under Subversion control as a working copy of it's equivalent imported into a repository, I just want to make sure it can work with the Cassini web server. That's where I am stuck. The ultimate goal is have this under SVN and view differences with TortoiseSVN.
Thanks for reading this far...hopefully someone can get me past this error and then I can move forward with the SVN and TortoiseSVN work.
Cassini doesn't, as far as I can tell, support classic ASP. An alternative would be to run a local install of Apache (since you can't/won't use IIS) which will host ASP, but is probably asking for trouble.
See also: http://blogs.msdn.com/mikhailarkhipov/archive/2005/06/24/432308.aspx
You could also run local IIS, which will, of course, host both ASP.NET and classic ASP. Visual Studio can easily be configured to debug with a local IIS install.
Points for moving to subversion: we use the Microsoft stack (Visual Studio, ASP.NET, SQL Server) with subversion and it works very well.
Subversion comment
GRRR.. bosses are fun. The svn model is known as copy/modify/merge. The repository lives in a central location - probably your file server. Using the svn client - or a Visual Studio plugin like the excellent AnkhSVN - each developer gets a LOCAL working copy,makes their changes and performs a "commit" when they're done working on a file.
SVN takes care of making sure that developers don't overwrite each others changes, provides a facility for merging changes when someone has modified a file between when you got your last copy and when you commit your changes, etc.
The whole point of a working copy is that it isolates developers from each other. The merge/commit step takes care of intergrating everyones changes. Having a central working copy that everyone works from defeats the purpose.
This is a very different approach than that used by Visual SourceSafe, which is basically a file locking mechanism. The fact that SVN is a real client-server application (where VSS is simply a disk-based "database" with no server app to administer it) provides all sorts of capabilities. We check out, modify, commit, then publish from svn to a dev server.
Also, if I remember correctly, Cassini won't server apps from a mapped drive.
I'm working on a fairly new project and we started from scratch. So not only the web application itself needs to get developed, but also the whole process of publishing the site and configuring the web server etc. need to be done from scratch.
This question might be more apropriate for serverfault, but that really depends on the answers. So, let's give it a try.
Wehn ever I publish our site via VS2008 (right click on the web site, publish web site, wait... done) I need to somehow tweak the process and trigger some other tasks, like:
- Copy some folders from my dav machine to the web server
- Delete the test database and let some scripts run on it
- and maybe some more I'm not remebering right now.
I was reading about the most obvious solutions like MSBuild, Powershell and VSTS2008, but I don't really want to dive deep into them until really I know, that theses tools can actually solve my problems. So guys, I'm pretty sure a lot of you have got a lot of knowledge about these tools or know even better ones. Please let me know. I really appreciate.
Thats my environment I'm living in:
- VS 2008
- VSTS 2008
- SQL Server 2008
- Windows Server 2008
UPDATE: Thanks for the great answers so far, but I'm especially looking for a solution integrated into Visual Studio Team Foundation Server as we're already using it for Source Control.
Cheers,
Steve
We deploy our web application with Subversion, and are very happy with it.
The build server compiles the application, copies it to a deploy directory and checks in changes to a Subversion repository. Okay, I admit that this is not trivial, but it's worth to invest here... because on the server(s) the deployment is now extremely easy. Advantages are:
Only the necessary files are copied to the server, the downtime is minimal (using svn update)
It's a piece of cake to verify what version is deployed to the server, and it's easy to have a consistent version across multiple web servers
If you screwed up, it's just 2 clicks to revert back to the previous version
It's takes care of deleting files when you deploy a new version. Copying a web application over an older version can leave potentially dangerous files
Modifications in the web.config are not overwritten by the deployment, they are merged. That's really a big plus
You can set pre and post build events, and can have one the events fire a script to complete your tasks.
You might look to see if the IIS Web Deployment Tool fits your scenario; it allows you to publish your website, configuration settings, database, etc... all together. This will also be integrated into Visual Studio 2010.
Since, for various reasons, I can't use IIS for an ASP.NET website I'm developing, I run Cassini from the command line to test the site. However, after installing Visual Studio 2008 SP1, I get a System.Net.Sockets.SocketException when I try to start up the web server. Is anyone else having this problem, and if so, how did you fix it?
Is there anything in the Application section of the event log?
Have you tried using a different port?
Per this thread, try:
Unbind from Visual Source safe, delete the web project from the solution, rename the folder where the website is stored and then re add to the solution as an existing web site and then bind to source safe again.
There may be some incorrect info in your .suo or .sln file. You can safely rename the former, as it is user-specific (solution user options); the latter (the solution itself) would be a bit more of a hassle to recreate.