Create an ASP.NET Project in Visual Studio .NET
- Last UpdatedJun 10, 2024
- 4 minute read
You can create an ASP.NET web site in Visual Studio and make the required changes to successfully embed the AVEVA Work Tasks controls in the application.
To create a Web Site
-
Open Microsoft Visual Studio. The Visual Studio Start Page appears.
-
On the File menu, point to New, and then click Web Site. The New Web Site dialog box appears.
-
In the Templates pane, select ASP.NET Web Site.
-
Select HTTP as the Web Location, and browse the path where the new web site has to be created. For example, http://localhost:9000/TelematicsWebSite.
-
Click OK. A new web site gets created.
-
Copy the following files and folders from the AVEVA Work Tasks Installed Path to the created web site's folder:
-
Copy the BPMUITemplates folder from [AVEVA Work Tasks Installed Path]\AVEVA\Work Tasks\Web\BPMUITemplates to the created web site's folder.
For example: If the TelematicsWebSite web site is created in D:\Develop\TelematicsWebSite folder, then copy BPMUITemplates folder to D:\Develop\TelematicsWebSite\.
Or
Create a Virtual Directory in the name of BPMUITemplates mapping to the physical folder of BPMUITemplates under the created IIS WebSite.
This step is required due to the following reasons:
-
ASP.NET applications that use AVEVA Work Tasks should include these files.
-
BPMUITemplates folder assists in the localization of the AVEVA Work Tasks controls.
-
The User Interface can be changed according to the user.
-
Changes to User controls like Work Item, Queue, Process Designer, BAM, and Calendar can be done in
-
BPMUITemplates folder.
-
-
Copy the App_Code folder from [AVEVA Work Tasks Installed Path]\AVEVA\Work Tasks\Web\EnterpriseConsole to the created web site's folder.
For example, if the WMTestSite web site created in D:\Develop\WMTestSite folder, then copy App_Code folder to D:\Develop\WMTestSite\. -
Copy the ComponentArt.Charting.lic and ComponentArt.Charting.WebChart.dll file from the [AVEVA Work Tasks Installed Path]\AVEVA\Work Tasks\Web\EnterpriseConsole\bin to the created website's bin folder.
Create a bin folder under the created web site's folder, if it does not exist. -
Copy the TempReports folder from [AVEVA Work Tasks Installed Path]\AVEVA\Work Tasks\Web\EnterpriseConsole to the created web site's folder.
-
Copy the FrameworkData folder from [AVEVA Work Tasks Installed Path]\AVEVA\Work Tasks\Web\EnterpriseConsole to the created website's folder.
-
-
Create the following .aspx pages for embedding AVEVA Work Tasks Web Server controls.
-
Designer.aspx for Process Designer control
-
WorkItemList.aspx for Work items list control
-
Calendar.aspx for Calendar control
-
BAM.aspx for BAM control
-
Queue.aspx for Queue control
-
List.aspx for List control
-
FormsWebpart.aspx to view Fill a form control
-
Execute.aspx to execute the workflow
-
ExecuteReport.aspx to view the workflow status
Note: Ensure that all the pages created above have the doctype tag <!DOCTYPE html>.
-
-
Add the following tag in the source of all the .aspx pages, except Designerbase.aspx, under the existing <DIV>tag:
<asp:Panel ID="Panel1" runat="server" Height="100%" Width="100%"></asp:Panel>
Add the style tag for <DIV>tag:
<div style="height:100%;">
Add the following style on each page within the <head> tag.
<style type="text/css''>
html, body, form
{
height: 100%;
}
</style>
-
Complete the following changes in the Web.config file of the custom application website or copy the Enterprise Console Web.config file to the custom application website.
-
Add the following entries within the <system.web> tag.
<pages validateRequest="false" clientIDMode="AutoID" controlRenderingCompatibilityVersion="3.5"/>
<httpRuntime requestValidationMode="3.5" encoderType="HtmlAttributeEncodingNot" maxQueryStringLength="9000" enableVersionHeader="false" enableHeaderChecking="false"/>
-
Add the following entries within the <system.web> tag.
<compilation debug="false" targetFramework="4.8">
<assemblies>
<add assembly="System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
</assemblies
</compilation>
-
-
Copy all the dll files which has entries in the web.config file of Enterprise Console to the custom site bin directory from AVEVA Work Tasks installed folder bin directory. Alternatively, you can add all the entries under the <assemblies> tag within Enterprise Console Web.Config to file to the custom site web.config file.
-
Add the following entries within the <system.web> tag.
<membership>
<providers>
<add name="SkeltaMemberShipProvider" type="SkeltaMemberShipProvider" />
</providers>
</membership>
<webParts>
<personalization defaultProvider="SkeltaPersonalizationProvider">
<providers>
<add name="SkeltaPersonalizationProvider" type="SkeltaPersonalizationProvider.SkeltaPersonalizationProvider" />
</providers>
<authorization>
<allow users="*" verbs="enterSharedScope" />
</authorization>
</personalization>
</webParts>
<customErrors mode="RemoteOnly" defaultRedirect="error.html" />
-
Add the following entries within the <httpHandlers> tag.
<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" validate="false" />
<add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/>
-
Add the following entries within the <system.webServer> tag.
<validation validateIntegratedModeConfiguration="false" />
<httpProtocol>
<customHeaders>
<remove name="Server" />
<remove name="X-AspNet-Version" />
<remove name="X-AspNetMvc-Version" />
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
<security>
<requestFiltering>
<requestLimits maxQueryString="9000"/>
</requestFiltering>
</security>
<staticContent>
<remove fileExtension=".woff" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
</staticContent>
-
Add the following entry within the <system.webServer><handlers> tag.
<add name="ReportViewerWebControl" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
-
Add the following entries within the <system.web.extensions> tag.
<scripting>
<webServices>
<jsonSerialization maxJsonLength="4096000" />
</webServices>
</scripting>
-
-
Right-click the hosted website, go to Manage Application, and then click Advanced Settings. The Advanced Settings dialog box appears.
-
It is recommended to set the Application Pool property to AVEVA Work Tasks Integrated.
If you use any other application pool or service to access Work Tasks, you need to add them to one of the following groups:
-
Administrators
-
aaAdministrators
-
aaConfigTools
For more details, refer to Cryptography Settings.
-
Note:
- Ensure to copy NewtonsoftJson.dll and AntiXSSLibrary.dll files from the Bin folder of the AVEVA Work Tasks application to the Bin folder of the custom application.
- Register the Telerik tag in all the mentioned aspx pages.
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI"
%>
- Add the following entry under the form tag of mentioned aspx pages.
<telerik:RadScriptManager runat="server" ID="RadScriptManager1" />