SharePoint cannot find custom workflow aspx form
-
Thursday, September 06, 2007 5:03 PM
1. I am developing on a remote XP machine
2. I am using WSS 3.0 only (no MOSS that I know of).
3. My workflow was built in Visual Studio 2005 and deployed as a feature using the install.bat file.
4. My custom aspx page is compiled with the workflow and uses code behind classes to handle data transfer between the workflow and the form.
5. The deployment went off without a hitch. When I log into the dev server, I can find my feature in the 12 hive FEATURES directory (12-hive is that long path that starts wtih Program Files\Common\Microsoft Shared\....etc)
6. I can find my aspx page on the server in the LAYOUTS directory. It has its own subdirectory to eliminate name conflict with existing aspx pages. My workflow.xml file points to this location.
7. I can see and activate my workflow to a document library in SharePoint. I did not make a custom association form so it just uses the default SharePoint page to save the assocition.
However, if I try to manually start my workflow on a document, I get a SharePoint error message: File Not Found. The URL in the address bar has references to some things I'm not sure of.
This my workflow.xml file contents:
<?
xml version="1.0" encoding="utf-8" ?><!--
_lcid="1033" _version="12.0.3015" _dal="1" --><!--
_LocalBinding --><!--
Insert Workflow.xml Code Snippet here. To do this:1) Right click on this page and select "Insert Snippet" (or press Ctrl+K, then X)
2) Select Snippets->Windows SharePoint Services Workflow->Workflow.xml Code
--><
Elements xmlns="http://schemas.microsoft.com/sharepoint/"><
Workflow Name="Test State Machine Workflow ASPX" Description="Uses custom aspx forms to run a custom workflow in WSS 3.0" Id="E972E4DF-1EA8-44b0-8EFA-EA21734DEC43" CodeBesideClass="TestStateMachineASPX.LocalPOC" CodeBesideAssembly="TestStateMachineASPX, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b276f6710a80a532" InstantiationUrl="_layouts/LocalPOC/testInitForm.aspx" StatusUrl="_layouts/WrkStat.aspx">
<
Categories/><
MetaData/></
Workflow></
Elements>Any ideas on what would cause this error?
Thanks
All Replies
-
Monday, September 10, 2007 5:14 PM
I have added a custom association form to the solution, recompiled it and deployed it. When I try to start the workflow manually against a doc in the library, I still get "File not found" message from SharePoint Services.
If I use Windows Explorer on the dev server, I can see my aspx pages in the correct LAYOUTS directory.
What gives?
new workflow.xml file:
<?
xml version="1.0" encoding="utf-8" ?><
Elements xmlns="http://schemas.microsoft.com/sharepoint/"><
Workflow Name="Test State Machine Workflow ASPX" Description="Uses aspx forms to run a custom workflow in WSS 3.0" Id="E972E4DF-1EA8-44b0-8EFA-EA21734DEC43" CodeBesideClass="TestStateMachineASPX.LocalPOC" CodeBesideAssembly="TestStateMachineASPX, Version=11.0.0.0, Culture=neutral, PublicKeyToken=b276f6710a80a532" AssociationUrl="_layouts/LocalPOC/testAssocForm.aspx" InstantiationUrl="_layouts/LocalPOC/testInitForm.aspx" StatusUrl="_layouts/WrkStat.aspx">
<
Categories/><
MetaData/></
Workflow></
Elements> -
Monday, September 10, 2007 6:21 PMOne more piece of info- SharePoint is running on a virtual server on our intranet. Would I need to modify any web config files in IIS?
-
Monday, September 10, 2007 10:24 PM
There's a lot going on here, so I won't attempt all of it at once--my quick advice is to try browsing directly to your aspx pages. The instantiation URL is the only important one at this point, right? So keep re-deploying until you hurdle the 404 errors, then work from there.
Also, I would beg beg beg if I were you and didn't have a VM. They're such productivity boosters, even justifying the licensing costs of Windows Server et al.
-
Friday, September 21, 2007 1:00 PM
can u share the custom workflows in share point uisng aspx forms not infopath form,
how to read the values in aspx page to the workflow .
can u sent any example for this workflows using aspx form.
waiting for ur reply.
Regards.
sapthagiri
-
Friday, September 21, 2007 8:20 PM
Here's a page giving some explanation: http://blogs.msdn.com/sharepoint/archive/2006/12/19/what-about-workflow-and-aspx-forms.aspx
Good luck
-
Tuesday, September 25, 2007 6:52 AM
hey i know this friend, iam asking you to share your solution. so that i will check in my system.
and mention me how ur deploying the aspx form work flow.
got it.
Regards.
sapthagiri
-
Sunday, March 30, 2008 11:02 PM
hi there, just found this post...I have the same issue. I have a custom associationform, everything looks fine..the file is in the layout folder but sharepoint gives a 'file not found' error. Nothing in the logs? Has anyone found how to fix this, if so could you please let me know.
Many thanks
Duncan
-
Monday, March 31, 2008 11:05 AMhi i had same problem with ASPx task forms
sharepoint used to say file not found
so what i did was i created a new form called as Default.aspx which was having no code in it just simple html in my web site
in your case in LocalPOC
and i tried to acces it. sharepoint was able to access it . now it was not giving me "file not found error". it was working..
so i got to know the it was able to acces the pages in my site ..
so i check the code...and i found there was BUG in it.
this bug was causing the error and it gaving me error [file not found]
i had not replaced my old developement sites referances
for eg this._myPoratlSite = new SPSite("http://sharepoint:9999");
i changed it according to my production site.
this._myPoratlSite = new SPSite("http://marcom:32");
i changed all the referance and it started working
i think the file not found refers to some error in code in aspx page.. check u r code aspx forms all the referance...
or just create a blank aspx page and try to attach it and see if its able to access that page
i hope that works
manish -
Tuesday, April 01, 2008 9:39 PM
Duncan Goodall wrote: hi there, just found this post...I have the same issue. I have a custom associationform, everything looks fine..the file is in the layout folder but sharepoint gives a 'file not found' error. Nothing in the logs? Has anyone found how to fix this, if so could you please let me know.
Many thanks
Duncan
Hi, I found the solution...I had not marked the assembly as safe in the web.config, apparently you either get a 'assembly is not safe' or 'file not found' error dpending on the circumstance. Fixed my problem anyway so hopefully this may help you.
Duncan- Proposed As Answer by Jorge_Carvalho Monday, November 03, 2008 12:28 PM
- Unproposed As Answer by Mike Walsh FINMicrosoft Community Contributor Tuesday, March 31, 2009 7:22 AM
-
Monday, March 30, 2009 6:26 PM
Hi, th below code can be treated as teh custom aspx form,w hcih can be treated as supervisr approval / higher level approval sform / initiator form(when send back/seek info) is performed..
we have followed the same and successfully testted statemachine WF
#region references
using System;
using System.Collections;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Xml;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.Workflow;
using Microsoft.SharePoint.Administration;
using Microsoft.Practices.EnterpriseLibrary;
using Microsoft.Practices.EnterpriseLibrary.Validation;using SolutionX.WSSDAL;
#endregion reference
namespace DCVWF
{
public class Default : LayoutsPageBase
{
protected SPWeb currentWebSite;
protected SPList List;
protected SPListItem m_task;protected Guid workflowId;
protected SPWorkflow workflow;
protected SPList ItemList;
protected SPListItem Item;
protected SPListItem lstItem
protected override void OnLoad(EventArgs ea)
{
base.OnLoad(ea)
string strListID = Request.Params["List"];if (strListID != null)
List = Web.Lists[new Guid(strListID)];m_task = List.GetItemById(Convert.ToInt32(Request.Params["ID"]));
try
{
workflowId = new Guid((string)m_task["WorkflowInstanceID"]);workflow = new SPWorkflow(Web, workflowId);
ItemList = workflow.ParentList;
Item = ItemList.GetItemById(workflow.ItemId);
int Id = ItemList.GetItemById(workflow.ItemId).ID;
lstItem = ItemList.Items.GetItemById(Id)
if (!Page.IsPostBack)
{//if(lstItem["FormStatus"].ToString() == "Requestor")
#region "Requestor"
HTH
if (lstItem["FormFor"].ToString().Equals("Requestor"))
{
lbllrequestor.style.Add(htmltextwriterstyle.display, "none");
..........................
}
PrasadWT- Edited by Prasadwt Monday, March 30, 2009 6:30 PM modified the the code
- Proposed As Answer by Prasadwt Tuesday, May 05, 2009 6:25 PM
- Unproposed As Answer by Mike Walsh FINMicrosoft Community Contributor Saturday, May 09, 2009 7:43 AM

