Latest developer linksBookmark and Share
 
HomeThis WeekTop MonthTop AlltimeSearchRegisterFAQ
  
 
Submit Your Link
Please login to submit your Link
 

Attachment upload error on browser based InfoPath form

Posted: Jan/18/2011   By: nikhil   Points:15   Category: .NET  - ASP.Net    Views:65   Vote Up (0)   Vote Down (0)    

Hello,

I am having an interesting problem with browser based InfoPath forms in SharePoint 2007.  For some reason the file attachment control is not working any more.  It was working fine in July, but now it will not allow file attachments over a few kb.  I tried a 34KB file and I get the error below, a 2KB file works fine.

Unable to connect to SQL Server session database. The connection string (server='SPDB', database='SharedServices1_DB') was returned by an instance of the IPartitionResolver type 'Microsoft.Office.Server.Administration.SqlSessionStateResolver, Microsoft.Office.Server, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.   at System.Web.SessionState.SqlSessionStateStore.ThrowSqlConnectionException(SqlConnection conn, Exception e)
   at System.Web.SessionState.SqlSessionStateStore.HandleInsertException(SqlConnection conn, Exception e, Boolean newItem, String id)
   at System.Web.SessionState.SqlSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem)
   at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

The form loads fine as a browser based form but then has the above error when I try to attach a file (Modified web config so I would get the full error).  Also, even though the attachment control is in InfoPath it is SharePoint that is returning the error. 

- I have checked 'maxRequestLength' in the web config and it is set to 51200, so that does not seem to be the problem. 
-
I also checked machine.config and I didn't see anything there (although I rarely look at that so I'm not sure I would recognize a problem if I saw it.) 
- I also saw this post where Tomas suggested that db_owner and public permissions be added to SQL server for the web front end machine.  That also did not help.
- I played around with many different InfoPath settings in Central Admin, but that didn't help either.
- Uninstalled .Net 4.0, in case a server update caused a change that broke things.
- Tried a new form with only an attachment control on a different site within the same site collection, same error. (So it doesn't seem to be a problem in the form).


I cannot think of anything that has changed, other than server updates.  Please let me know if you have any ideas.

Thanks,

Eric

View Complete Post


Comments:
Be the first to comment this post.
 
Post Comment
Please login to post your comment
More Related Resources

send alert message to user if close internet browser before save web form data

  

 Hi, I have window form to let user fill data, I want to alert user if close web browser before saved web form data, could anyone provide any clue?

 

Thanks,

Martin


open datareader associated with this connection error...

  

I'm trying to figure out how I can get around an error I get when multiple users are accessing different my site. I'm getting an error:

there is already an open datareader associated with this connection which must be closed first

It's not the same query everytime but I recently triggered it on this statement:

Dim adapterSavedState As New SQLDataAdapter("SELECT SavedStateContactView, SavedStatePropertyView, SavedStateTransView, SavedStateCompanyView FROM WebusersProfiles WHERE ContactID = '" & Session("ContactID") & "'", myConnection)
    Dim dtSavedState As New DataTable()
    adapterSavedState.Fill(dtSavedState)
         Dim rowSavedState As DataRow
         For Each rowSavedState In dtSavedState.Rows
             If Request.QueryString("View") = "Contact" Then
                SavedState = rowSavedState("SavedStateContactView").ToString()
            Else If Request.QueryString("View") = "Property" Then
                SavedState = rowSavedState("SavedStatePropertyView").ToString()
            Else If Request.QueryString("View") = "Trans" Then
                SavedState = rowSavedState("SavedStateTransView").ToString()
            Else If Request.QueryString("View") = "Company" Then
                SavedState = rowSavedState("SavedStateCompanyView").ToString()
            End If
         Next rowSavedState


I define my connection in my basepage

    Public Dim MyConnection As SqlConnection
    Public Shared Dim strSite As String = "dev"
        
    Protected Overrides Sub OnLoad(ByVal e As System.EventArgs)
        myConnection = New SqlConnection("server=xxxx;database=xxxxx;User ID=xxxxx;Password=xxxxx;")


Where is my issue and how can I overcome it? This is a .net 1.1 site so MARS I know is not available...


master page error

  

I'm doing an application which has already contains a master page named Master.master. And all related web forms(Webpage) are running well. But I create another master page in same application named Profile.master for some other web form(Webpage). But this time some of the related pages are running a blank page and some are generating an error that is:-

is not allowed here because it does not extend class 'System.Web.UI.Page'.

please help me to rectify this error.



Vishal Purohit


The remote server returned an error: (403) Forbidden.

  

Hi All,

i have a program in vb.net..i use the webrequest to post the data to another page (http://localpost/posReceived.aspx), and use the webResponse to get the back the response from the remote page.

When i run this program, it returned error "The remote server returned an error: (403) Forbidden.". I have no idea on this. Coz my aspx page and posReceived.aspx are placed in the same server and same directory. I supposed it should be worked without any security concerns.

Can anyone help me to solve it. Thanks a lot!

 

 

 


access to web form from class

  

hey,

i've read several posts with similar but problems, but i can't find one exactly like what i am seeing.  This is probably very simple...i just can't get the exact solution.

Platform is c#, VS 2010.

I have a web form and code behind file, with scripting that works just fine.  i'm trying to move script from the code behind file into a class, to consolodate and create re-use. The basic problem is when i move the script into the class, i cannot access the webform.

error here on "this":   HyperLink hyplAlertbox = (HyperLink)this.frmEtsuHome.FindControl(codeboxID);

i know WHY it throws the error, i just don't know how to fix it.  any help is appreciated.

below is simplified code....

------------------------------------------------------------------------------------------------

New Script in Code Behind File:


namespace myhome
{
    public partial class _default : System.Web.UI.Page
    {
                    
        protected void Page_Load(object sender, EventArgs e)
        {
             new majorAlerts();
             majorAlerts.GetAlerts();
             majorAlerts.ProcessAlerts(); } } }

-------------------------------------------------------------------------------------

Code for the Class

-------------------------------------------------------------------------------------


using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI.WebControls;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;

namespace myhome
{
    public class majorAlerts
    {
        
        public static void GetAlerts()
        {
            // grab the alerts and store them in a list                     
        }

public static void ParseAlerts(List<Alert> lAlerts) {
            foreach (Alert Alert in lAlerts) { // create codebox ID codeboxID = "codebox" + index.ToString(); // find hyperlink with ID of codeboxN cand reate an instance of it HyperLink hyplAlertbox = (HyperLink)this.frmMyHome.FindControl(codeboxID);

//******************* ERROR *************************************************
// ERROR ON this in previous line.  i understand, because "this" is not the form like it is in the code behind file.
// but i don't know how to modify "this" and make it work from class file
// **************************************************************************

 // set hyperlink URL value for alert based on alert ID alertURL = "http://www.blah.com"; hyplAlertbox.NavigateUrl = alertURL; } }




"Tabbed" Form with strongly typed model and validation after each tab

  

I got a very long user creation form with tons of validation.  Works fine.

Now I want to "split" this form into 5, displaying each form in a set of tabs (will be using jQuery UI Tabs).

So when you start, Tab1 is enabled, the rest not.

You finish what is in Tab1, and click "Next", the part of the original long form get validated (like a normal form using client side and remote validation .....it *must* be client side.  User Requirement.)

If valid, Tab2 becomes enabled, and also the user are shown Tab2.

Once the user get to finish and reach the last tab (which will basically just have a "Submit" button) I need to post everything that was entered across the series of tabs to the server (back to the single form/model/controller the existing form works on).

Any tips / advice / samples out there will be welcome.  (However not suggestions to change the requirements....picky as hell client)

Thanks for reading....


Error Creating Control

  

I have created a sample Web App. for creating dynamic controls. It worked fine when I originally created it, however after closing the solution and opening a couple days later this is what happens. Any ideas why?

 

Error Creating Control - ScriptManager1, Oject Reference not set to an instance of an object. 

Error Creating Control - Button1, Oject Reference not set to an instance of an object. 

Error Creating Control - UpdatePanel1, Oject Reference not set to an instance of an object.

 

<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="WebApplication5._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>

<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
 <asp:Button ID="Button1" runat="server" Text="Button" />
    <div style="text-align: center; float: left; width: 336px;">
        <div style="background-color: Aqua; ">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <br />
                <asp:PlaceHolder runat="server" id="myPlaceHolder" />
                <br />
            </ContentTemplate>
            <Triggers>
                <asp:AsyncPostBackTrigger ControlID="MyButton" EventName="Click" />
            </Triggers>

            </asp:UpdatePanel>
       </div>
   </div>

   <div style="text-align: center; float: left; width: 336px;">
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
            <asp:Button ID="btnAddTextBox" runat="server" Text="Add Control" OnClick="btnAddTextBox_Click" Width="200" />
            <br /> <br />
            <asp:Button ID="RemoveTextBoxButton" runat="server" Text="Remove Control" OnClick="RemoveTextBoxButton_Click" Width="200" />
            <br /> <br />
            <asp:Button ID="MyButton" runat="server" Text="My Button" Width="200" />
            <br /> <br />
            <asp:Label runat="server" ID="MyLabel"></asp:Label>
        </ContentTemplate>
    </asp:UpdatePanel>
    
</div>

</asp:Content>


 

 

 

 

 


Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors. Parameter name: element

  

Hello,

I am facing this error 

Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.
Parameter name: element

Microsoft JScript runtime error: Sys.ArgumentException: Value must not be null for Controls and Behaviors.

Parameter name: element

while using Ajaxtoolkit ModelPopupextender with listview, actually I am retriving image from database to the listview in VS 2008. 

Can anyone please help me out of this..


error calling webservice using json

  

 I am trying to populate dropdown using json. It calls the webservice method but its not returning any value and get a error code 500.

My code is as

function changeContextKey()
		{
		var servicePath = "http://localhost:3496/ccm/WsWebService.asmx";
		var methodName = "add";
		var useGet = false ;
		var xValue = $get("cboScenario").value;
//		var yValue = "Scenario:8";
//		var zValue = "";
		alert("xValue");
		var params = {x: xValue};
		var userContext = $get ("result");
		var webServiceProxy = new Sys.Net.WebServiceProxy ();
		webServiceProxy .set_timeout(0);
		request = webServiceProxy ._invoke(servicePath ,methodName ,useGet ,params ,onSuccess, onFailure, userContext );
		}
		function onSuccess(result, userContext, methodName)
		
		{
		userContext .innerHtML = "<b><u>" + result + "</b></u>"
		
		
		}
		
		function onFailure(result, userContext, methodName)
		{
		    alert('Ravi');
		
		}

and in webservice we are just calling a method which populate 
 [WebMethod ]
    public DataSet add(string x)
    {

//code for populating using x
return dataset;


     }


follows

 


Getting error using json

  

 I am trying to call webservice method using JSON.

my code is as follows

<script src="jquery-1.3.2.min.js" type ="text/javascript" ></script>
    <script type ="text/javascript" >
    var pageUrl = '<%=ResolveUrl("~/CS.aspx")%>'
function PopulateContinents() {
    $("#<%=ddlCountries.ClientID%>").attr("disabled", "disabled");
    $("#<%=ddlCities.ClientID%>").attr("disabled", "disabled");
    if ($('#<%=ddlContinents.ClientID%>').val() == "0") {
        $('#<%=ddlCountries.ClientID %>').empty().append('<option selected="selected" value="0">Please select</option>');
        $('#<%=ddlCities.ClientID %>').empty().append('<option selected="selected" value="0">Please select</option>');
    }
    else {
        $('#<%=ddlCountries.ClientID %>').empty().append('<option selected="selected" value="0">Loading...</option>');
        $.ajax({
            type: "POST",
            url: "CS.aspx.cs/PopulateCountries",
            data: "()" ,
            contentType: "application/json; charset=utf-8",
            timeout: 10000,
            dataType: "json",
            success: OnCountriesPopulated,
            error: function(xhr) {if (!error) return;
                                    if (xhr.responseText)
                                    {var err = JSON2.parse(xhr.responseText);
                                                                if (err)error(err);
                                                                else error( { Message: "Unknown server error." })} return;},
            failure: function(response) {
                alert(response.d);
            }
        });
    }
}


 

 

But am getting error like this:

<html>
    <head>
        <title>This type of page is not served.</title>
        <style>
         body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;} 
         p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
         b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
         H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
         H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
         pre {font-family:"Lucida Console";font-size: .9em}
         .marker {font-weight: bold; color: black;text-decoration: none;}
         .version {color: gray;}
         .error {margin-bottom: 10px;}
         .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
        </style>
    </head>

    <body bgcolor="white">

            <span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>

            <h2> <i>This type of page is not served.</i> </h2></span>

            <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

            <b> Description: </b>The type of page you have requested is not served because it has been explicitly forbidden.     Please review the URL below and make sure that it is spelled correctly.
            <br><br>

            <b> Requested URL: </b>/CS.aspx.cs/PopulateCountries<br><br>

            <hr width=100% size=1 color=silver>

            <b>Version Information:</b> Microsoft .NET Framework Version:2.0.50727.1882; ASP.NET Version:2.0.50727.1887

            </font>

    </body>
</html>
<!-- 
[HttpException]: Path '/CS.aspx.cs/PopulateCountries' is forbidden.
   at System.Web.HttpForbiddenHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
-->


 

how to overcome this problem?


 
Categories:
.NET
Java
PHP
C/C++/VC++
HTML/XML
SAP
MainFrames
Data Warehousing
Testing
MySQL
SQL Server
Oracle
Javascript/VB Script
Others
Login
 
 
 
 
 Forgot password
 Contact Us   Terms Of use   Share your knowledge