Error in Acumatica while working in Debug Mode ?? JSManager.GetBatchMode - acumatica

I have been working With Acumatica and it runs quite nicely in IIS. However in the Visual Studio Web Express Debug Mode - I am unable to run. Error in JSManager.GetBatchMode ! What are steps to be done to run in Debug !
The Code is as follows.
protected override void OnInit(EventArgs e)
{
this.InitializeControlsOnInit();
this.CheckLastScreenAccess();
if (!this.IsCallback)
{
var renderer = JSManager.GetRenderer(this);
var scriptFiles = new List<string>();
PXContext.Session.PXSharedScriptFiles[JSManager.SharedScriptFilesKey] = scriptFiles;
if (JSManager.GetBatchMode())

Acumatica installer doesn't make straightforward copy/paste file. I can tell you more, if you copy paste files from one IIS folder and decide to paste in another IIS folder, with another name you'll face issues, which will be hard to understand and explain and/or reproduce. If you remember, Acumatica during installation verifies whether IIS is installed, and without IIS installer will not work. It's not just empty statement. Local IIS is the only one way of working with Acumatica without making your life more complicated.

Related

Deploy a windows service without Installshield

Is it possible to deploy a windows service without going through Installshield? I have a very basic service which simply probes a database, and wish to deploy it on a server.
I tried using Installsheild LE, but get error 1001 on install, which is hard to troubleshoot, and anyhow Installshield feels like overkill in this case... is there a way can just install the service direct by command line or other method?
Yes.
However, there are options, from best to worst:
There are other tools for writing installers out there. Eg. the full version of install Shield or WiX (which MS created, and is used for the Visual Studio installer).
You could use installUtil having included a type derived from ServiceInstaller in your assembly. (See How to: Install and Uninstall Service.)
You can manually edit the registry.
#3 Is seriously easy to mess up, and won't help you with the event logging and performance counters you should be including.1 #2 is best in development, and will set up event logs and performance counters as well (remember you'll need to elevate to install things, and to attach a debugger to the service when running as a service).
Using a real installer (#1) is best in test (staging) and production environments.
1 When you get asked why it isn't working, you'll want to be able to work out what's going on (or not).
Yes, if your service has an Installer class then, you can install it from command line with installutil.exe
using System.ComponentModel;
using System.Configuration.Install;
using System.ServiceProcess;
[RunInstaller(true)]
public class ServiceInstaller : Installer
{
public ServiceInstaller()
{
ServiceProcessInstaller serviceProcessInstaller = new ServiceProcessInstaller();
ServiceInstaller serviceInstaller = new ServiceInstaller();
//# Service Account Information
serviceProcessInstaller.Account = ServiceAccount.User;
serviceProcessInstaller.Username = "";
serviceProcessInstaller.Password = "";
//# Service Information
serviceInstaller.DisplayName = "Service name"
serviceInstaller.Description = "Service description"
serviceInstaller.StartType = ServiceStartMode.Automatic;
//# This must be identical to the WindowsService.ServiceBase name
//# set in the constructor of WindowsService.cs
serviceInstaller.ServiceName = "Service Name";
this.Installers.Add(serviceProcessInstaller);
this.Installers.Add(serviceInstaller);
}
}
Building and Deploying a Windows Service using IsWiX
The above is a short video I made showing how to use WiX / IsWiX to generate a very clean MSI for installing a service. It's really easy, fast, elegant and free.
You can use the command line tool sc.exe to create and configure a windows service (basically insert the config into registry), assuming you have already deployed the built .exe to disk somewhere on your server.
http://support2.microsoft.com/kb/251192

IIS and Visual Studio is having different result

http://localhost:72/Home/Support?_subject=&_category=&_reportedDateFrom=09%2F05%2F2013&_reportedDateTo=09%2F05%2F2013&_solvedDateFrom=&_solvedDateTo=&_status=
Above is the pre-setup IIS website .. the date filtering is not filtering correctly.
http://localhost:54550/Home/Support?_subject=&_category=&_reportedDateFrom=09%2F05%2F2013&_reportedDateTo=09%2F05%2F2013&_solvedDateFrom=&_solvedDateTo=&_status=
Above is the visual studio debug URL, just the port number is different and it's working perfectly.
I have no idea what is happening.
To debug this I would start with the following:
Do a clean and rebuild of your solution.
Make sure you don't have two copies of the application running.
Make sure the application is being hosted in IIS properly. (Does the app show up when you right click and browse the web site from the IIS manager)
Attach the debugger to the process running under IIS in order to inspect the query parameters.
This article is getting a bit old but it has the general procedure you need to follow to attach to IIS to inspect a process.

Cant read configuration. RoleEnvironment may be inaccessible due to its protection level

This is my first azure project and I'm not sure if I'm doing something wrong.
I'm trying to get some configuration inside an MVC 3 webrole and for this I'm using:
RoleEnvironment.GetConfigurationSettingValue(KeyName)
When I run the application on the emulator i get his error:
BC30451: 'RoleEnvironment' is not declared. It may be inaccessible due to its protection level.
I tried to add the full namespace like this:
Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.GetConfigurationSettingValue(KeyName)
And I get this error:
BC30456: 'ServiceRuntime' is not a member of 'WindowsAzure'.
However, I can access the RoleEnvironment inside the "OnStart" event of the WebRole class.
So, is it the expected behavior? If yes, how am I supposed to read configuration through the whole project?
Thanks in advance;
Have you added a reference to the Microsoft.WindowsAzure.ServiceRuntime assembly in your MVC project?
http://msdn.microsoft.com/en-us/library/microsoft.windowsazure.serviceruntime.roleenvironment.aspx
I started a new solution based on seanost suggestion and it worked well, so I figured the problem wasn't VS. After a few try and errors I finally found a solution, I just don't have an explanation for it :-)
Under my MVC project I have a folder called "App_Code".
Since i come from web forms development I'm use to the name so I created this folder to keep some classes. If I try to access "RoleEnviroment" from a class inside this folder the project compiles but won't even open, no matter what I try to access it will throw the same error.
If I rename the folder or move the files to another folder (let's say "Code"), it just works.
As I said before, I just don't know why it happens (and it doesn;t really matter now :-)
FYI, if you're using Visual Studio's Azure templates, references to the following namespaces are included by default, so it's not necessary to set Copy Local to true:
Microsoft.WindowsAzure.Diagnostics
Microsoft.WindowsAzure.ServiceRuntime
Microsoft.WindowsAzure.StorageClient
To make sure Visual Studio and the SDK is installed correctly, you should be able to do the following: Create a new MVC3 Azure project, add a using directive for the ServiceRuntime library in your Home controller, then add the following code in the Index action:
ViewBag.configValue = RoleEnvironment.GetConfigurationSettingValue("Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString");
return View();
Then, add the following Razor syntax in the View:
<p>#ViewBag.configValue;</p>
And you should get the following result in your browser:
UseDevelopmentStorage=true

WebApplication moss feature throws FileNotFound on one environment

I developed a certain feature at web application scope, I've deployed it in my development computer, activated it and it worked fine.
Once I've deployed it in out Test environment and tried to activate it, it throws "File Not Found".
The main difference between the servers which I think of is that the Central Admin in the Test env. is not a front-end, while in my dev computer everything is hosted on the same computer.
I think it has something to do with the feature trying to reach "propeties.Feature.Parent as SPWebApplication" (I can't debug the code in the test environment)
Any ideas ?
Thanks in advanced.
Ok, this is the second time I’ve had this problem, so I’m going to
blog about it so maybe I’ll remember next time. If you’re using VS
2010 and developing outside of IIS (console application in my case),
you need to make sure your project is not targeting the x86 Platform.
Go to your Project Properties, click the Build tab, and make sure the
Platform target dropdown is set to x64 (or Any Platform). Another less
than helpful error…
From FileNotFound Exception when creating SPSite or getting reference to SPWebApplication (SharePoint 2010)
Also see this post: FileNotFoundException with the SPSite constructor

The type or namespace name 'Script' does not exist in the namespace 'System.Web'

I just deployed a website into IIS 7 (about which I am woefully ignorant), and upon trying to build the site, I receive this error. I did a little googleing and I saw an article that said I should put system.web.extensions.dll into the /bin. But, I also saw an article saying not to do that. I tried it anyway, but I just received a different error ('Resource cannot be found').
I am totally clueless as to what else to try
Can you use the "Publish" command in Visual Studio to publish directly to the site? If not, then use that command to publish to a similar site on your machine, then copy it to the customer site.
You should also look into the IIS Web Deployment Tool. It can copy an entire site, including IIS settings and any databases. It will be built into VS2010.
Go to control panel, then programs, turn windows features on or off, scroll down to Microsoft.net framework 3.5.1 expand, make sure both sub options are selected, this might help your issue.

Resources