Jquery - Web Application Accessing SharePoint Object Model?

Sep 21, 2010

I have an asp.net 2.0 web application that will run on the same web servers as SharePoint Server 2007. The application should run in its own App Pool (IIS 6.0). The Web Application needs to call the SharePoint Object model API.

Is there a resource that explains the required configuration / security settings and other considerations? It is possible that I need to make some settings in SharePoint Admin Console itself; aswell as config files. Script files might need to be located in a specific location in order to be accessible. Assemblies may need to be signed.

I can only get partial success running my Web application. But only if it is deployed to a Virtual Directory that resides under the SharePoint Website (in IIS & File system). Even with this setup, I JQuery / Javascript throw errors when accessed (object null); and also images not loading.

I have made some changes to the Web applicaton web.config file which have allowed me to run the application albeit the above mentioned issues with scripts and images (Virtual directory properties also set to allow scripts and executables to run). Ajax functionality appears to work OK.

View 1 Replies


Similar Messages:

Trying To Use The Sharepoint Object Model From Page?

Jan 7, 2011

I am having an issue with something that seems like it should be simple. I am just trying to use the sharepoint object model from an ASP.net page. It's running on Framework 3.5 (required by sharepoint), and I realize it needs to be set to build on x64 (also required by sharepoint from what I understand). The issue is when I do this it returns "Could not load file or assemply ". If I switch it to any CPU then it reports that the call to build SPSite can't find the site address.

Basically if I open a brand new web app project and switch it to framework 3.5 and build target x64 it will report this same error. It seems like I am doing something stupid but I have no idea what it could be.

View 2 Replies

JQuery Object Expected Error When Accessing Page Via Url Routing?

May 29, 2010

In my global.asax I have url routing setup like below:

routes.MapPageRoute("User Logon", "{Vendor}/Logon", "~/Logon.aspx");

In the logon.aspx page, I have a script that "stylizes" the logon button:

<link href="jquery/css/flick/jquery-ui-1.8.1.custom.css" rel="stylesheet" type="text/css" />
<link href="images/style.css" rel="stylesheet" type="text/css" />
<script src="jquery/js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery/js/jquery-ui-1.8.1.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#<%= ButtonLogon.ClientID %>').button();
});
</script>

When I access the page us a url (in debug mode) http://localhost/logon.aspx?v=1 the page loads correctly and the jquery button command loads correctly. But then I access the page using the new url route, I get this error.

Microsoft JScript runtime error: Object expected

View 2 Replies

Javascript - How To Get Rid Of "Menu_HoverRoot(this) Object Expected" Error In Application (SharePoint 2007)

Jun 7, 2010

I have just deployed my ASP.NET/C# code to a sharepoint server and am getting this error when hoving over the menu:Menu_HoverRoot(this) Object ExpectedI have absolutely no idea what is causing it, but have seen other people with this problem, and it seems to be something with WebResource.axd.

View 1 Replies

C# - Accessing Sharepoint From A WebApplication?

Feb 25, 2011

currently investigating SharePoint for our company as a means to make Excel processing accessible through our web application without relying on the Office Interop DLL files. (our sysadmin doesnt want to install Office on the production server, for good reason)I'm aware that Sharepoint has an Excel Webservice that can be enabled and used by the application. The problem, if it is a problem, is that I need to make a class that wraps all the logic for transforming an Excel into HTML.So I need to add the references to this webservice to the application.

But what if we need to deploy the application with a customer that has no SharePoint server available, will this cause a problem in the application? We will use checks to make stuff visible and invisible depending on whether a parameter is set, but I'm looking for a means to ensure that I can for example add the required references at runtime when I need them for Sharepoint.

View 1 Replies

C# - How To Pass Credentials To Httpwebrequest For Accessing SharePoint Library

Mar 4, 2011

I try to read a file from SharePoint document library through httpwebrequest.For that I have to pass the credentials.So How should I pass the creadentials.

HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "application/msexcel";
request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
request.Credentials = new NetworkCredential(UserName, PassWord);

View 3 Replies

Access Office Word Object Model Through Asp Results - Error 80070005 - COM Object Not Registered

Aug 13, 2010

I have developed a website that allows users to upload office documents then uses the office object model to convert the document to an HTML file that it then displays in an iFrame. I have, of course, included references to Office.interop.word, and the site works fine on my development machine. When I uploaded it to my production server the site functions fine until I try to upload a document. I initially got a similar error that said "COM object not registered". I realized that Word wasn't installed on my production server. So I installed word and now when the server tries to access the word object model I receive the following error:

Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

I searched the registry for the corresponding CLSID and found a corresponding folder. I added full control to the IUSR_ account and due to the persistence of the error I eventually added full control to "everyone" and ensured these permissions inherited down to the rest of the folder. I then added full control to IUSR_ and again eventually added full control to "everyone" to my microsoft office folder. I don't know what other permissions to grant and where in order to make this "Access is denied" error go away. I must be granting them in the wrong place, because as far as I know I can't be any more permissive than "Everyone" "Full Control".

View 1 Replies

Web Forms :: Accessing Control In Usercontrol / Error: Object Reference Not Set To An Instance Of An Object

Apr 19, 2010

In the same Code behind file I have:

// This works

Label lblTopNavBarInfo = (Label)Master.FindControl("lblTopNavBarInfo");

lblTopNavBarInfo.Text = "Currently Serving: + FirstName + " " + LastName ;
// This compiles but throws an error in the browser

LinkButton lnkBtnProductsOwned = (LinkButton)LeftNav_CustServ1.FindControl("ProductsOwned"); // The Control is visible

lnkBtnProductsOwned.Enabled = false; // Error: Object reference not set to an instance of an object.

View 6 Replies

Data Controls :: Accessing DropDownList In GridView Row - Object Reference Not Set To Instance Of Object

May 30, 2013

I have this part in the Gridview.

<asp:TemplateField HeaderText="Student">
<ItemTemplate>
<asp:DropDownList ID="ddl" OnSelectedIndexChanged="ddl_IndexChanged" runat="server">
</asp:DropDownList>

[Code]....

After the change, when it is to bind data, I get this Exception message. Why?Object reference not set to an instance of an object.

View 1 Replies

DataSource Controls :: Error Accessing SQL Server Db From User Control In SharePoint

Jan 15, 2010

I'm developing an ASP.NET user control in VS2008 that writes to a SQL Server 2005 database. I've published the control to a SharePoint 2007 MOSS page using the SmartPart addon. The control consists of a few text fields and a submit button that writes the contents of the text fields to the database. When I test the control in the Visual Studio debugger, it works fine. When I try to submit data from the SharePoint page, I get the error shown at the end of this post. Last time I saw this, it was a database permissions error, but I've granted my site's default application pool read/write access to my database. Does anyone have any idea what else the problem might be? Also, how can I double-check the credentials that the SharePoint page is using to access the database, since I still suspect that this is a permissions issue?

[ERROR TEXT FOLLOWS]
Server Error in '/' Application.

Object reference not set to an instance of an object.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
ConnectionHandler.ClientDataConnect() +103
ClientData.ClientData.Page_Load(Object sender, EventArgs e) +1426
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +24
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +41
System.Web.UI.Control.OnLoad(EventArgs e) +131
System.Web.UI.Control.LoadRecursive() +65
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Control.LoadRecursive() +190
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2427
Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.3053

View 2 Replies

MVC :: In View ,model Item Accessing?

Jan 12, 2011

i have a model for shoping cart application

namespace Demo1.Models
{
public class ShopCart
{
[code]...

for this index action

1- I right click and -> Add view,

2- selected create strogly-typed view and selected ShopCart

3- view content selected List

view created as

<table>
<tr>
<th></th>[code]....

i cannot using "foreach (var item in Model.lines)" . but ShopCart has lines property. so i cannot using "item.quantity"

Model like a collection generic.

View 8 Replies

Forms Data Controls :: Getting Error While Accessing Entity Model From Web Service?

Jun 4, 2010

I am getting error while accessing entity model from web serviceSystem.NotSupportedException: SQL Server Compact is not intended for ASP.NET development. at System.Data.SqlServerCe.SqlCeRestriction.CheckExplicitWebHosting() at System.Data.SqlServerCe.SqlCeConnection..ctor() at System.Data.SqlServerCe.SqlCeProviderFactory.CreateConnection() at System.Data.EntityClient.EntityConnection.GetStoreConnection(DbProviderFactory factory) at System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) at System.Data.EntityClient.EntityConnection..ctor(String connectionString) at System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) at System.Data.Objects.ObjectContext..ctor(String connectionString, String defaultContainerName) at DataModel.LabTestDBEntities..ctor() in d:projects4.0 vs2010labtestlabtestsolutiondatamodeldbmodel.designer.cs:line 26 at DataService.Service1..ctor() in D:Projects4.0 VS2010LabTestLabTestSolutionDataServiceService1.asmx.cs:line 23

View 4 Replies

JQuery :: Accessing ASPX Page Elements From ASCX'S Jquery Function

Sep 20, 2010

I have aspx page and in that page i registerd ascx page. i want to access the aspx page <div id = "idofdiv"> from ascx page jquery function. i have jquery function in ascx page. i want to access idofdiv in that function.

View 2 Replies

JQuery :: Accessing The Gridview Text After Altering It With Jquery And Dropdown Selection?

Jan 31, 2011

i m having a bit of trouble here with .. i am changing the text from a dropdown inside the gridview to a cell inside that perticular row.... the code for the jquery i hav used to alter the text is :

[Code]....

the corresponding gridview is :

[Code]....

now after the text is changed into the corresponding cell ... i m trying to access it as per normal server side code as :

[Code]....

View 5 Replies

C# - Sharepoint Web App And Jquery Combination?

Feb 19, 2010

Within SharePoint...

I can create web parts which are ASP.NET web apps, which allows me to get information about the current user (groups they are in, username, etc.).

I can create web parts which allow me to manipulate fields on SharePoint forms.

But I have not found a way to be able to combine the two things.

I can't access the content of one web part from the other kind (WebApp Page Viewer & Jquery Content Editor Web Part being the two kinds).

What I would like to be able to do is create a web service and then consume it with a jquery ajax call, but I keep getting a js "Access Denied" message.

View 1 Replies

Unable To Use Webclient Object To Download A File In SharePoint Email Enabled Document Library?

Feb 22, 2010

I am using webclient object to download a file to a windows folder from a sharepoint document library. The credentials I am passing to the webclient object are that of site collection administrator. everything works fine while i test it by uploading a file to the document library. But since the document library is email enabled; when an email is received the file is not transferred to the windows folder. i have put some workflow history events to see which user account is used when the email is received. the user account shown is the network service account. I have given write permissions on the folder to all the users; Everyone, Network service, the site collection administrator user etc. but still i cant figure out what is the problem.

View 2 Replies

Create A Sharepoint Application?

Jun 10, 2010

how to create a sharepoint application using asp.net

View 2 Replies

Deploy Application In The Same Website As Sharepoint

Jul 15, 2010

I am trying to deploy the Bugtracker.NET tool [URL], which is a normal ASP.NET 2.0 application, into the default web site of an IIS which already has Sharepoint installed in it. The OS is Windows Server 2008 R2, IIS 7.5 and Sharepoint Services 3.0. The question is that when I execute the application, I get a NullReferenceException because HttpContext.Current.Session is null, and I think that this could be due to a problem with the configuration of the web site, as the application runs perfect in web sites with no Sharepoint installed.

I already know that Sharepoint customizes the web site with handles, modules and so on, that all applications in the web site inherit, modifying their behavior. I have already given to the ASP.NET application Full trust level, enabled Anonymous authentication and InProc session state, but I am still getting that HttpContext.Current.Session is null. Even changing the app pool from Wss3AppPool to DefaultAppPool does not succeed. Maybe someone could tell me which settings do I need to tweak in the web site in order to avoid this exception.

View 1 Replies

Precompile .net Application / Webpart For WSS / SharePoint

Jun 15, 2010

I have built a few custom applications that run on WSS 3 using the Visual Studio 2010 Web application template. When I compile the application, Visual Studio creates the assembly file in the bin directory which I copy over later to the production server (another machine) with WSS 3. The compiled application dll file is copied into the bin folder inside the virtual directory of WSS and runs fine in there

View 2 Replies

C# - Display PDF - Application Page SharePoint?

May 26, 2010

I am working on a Custom WebPart, for which I need an application page to render a PDF file.

I am currently using following link [URL]

It works fine in ASP.NET, but gives a blank page in SharePoint.

Here's the code:

(PDF file is in same directory)
Response.ClearContent();
Response.ClearHeaders();
//Set the appropriate ContentType.
Response.ContentType = "Application/pdf";
//Get the physical path to the file.
string FilePath = MapPath("Test.pdf");
//Write the file directly to the HTTP content output stream.
Response.WriteFile(FilePath);
Response.Flush();
Response.End();

View 1 Replies

Jquery Calendar Control Not Working In Sharepoint 2010

Jan 20, 2011

I have the following code which works well on my local machine, but when I deploy it to Sharepoint 2010 the jquery doesnt work... the calender control doesnt pop up when the web page is added to Sharepoint.

[Code]....

View 3 Replies

Web Parts Vs. Full Blown Application In SharePoint?

Mar 2, 2011

I'm trying to get up to speed with SharePoint, coming from ASP.NET Web Forms. We're looking to use SharePoint exclusively for several reasons; one of the main selling points is to consolidate our development efforts. So for example, today we have several one-off websites with anywhere from 1-5 pages (smallish) on several servers, IIS installs, etc. and seem to be a bit fragmented.

Let's say I have a requirement for a smallish site (1-5) pages. What is the SharePoint way to handle this situation? Do I create several Web Parts, then create the pages in SharePoint and plug them in or do I simply create an ASP.NET Web Forms application and provide a link within SharePoint to it?

Update.I'm going with neither. Based on feedback and additional research it seems that Application pages are what I'm looking for. Here's a good article:

http://grounding.co.za/blogs/brett/archive/2008/07/13/sharepoint-the-role-of-a-web-part-vs-using-application-pages.aspx

View 4 Replies

Deploy Web Application To A Sharepoint 2010 Site Using WSP

Aug 2, 2010

Suppose I created a custom web application that consists of: several assembly DLLs: web app, business logic, data services multiple aspx pages and ascx custom controls that use them custom configuration section custom HTTP module. More or less the usual stuff. I would like to deploy it to a particular sharepoint site under a certain subfolder. So if I access my sharepoint site via [URL] (because I'm not using sites/some_site) I'd like my application to be available under [URL]

I could manually add a virtual folder (not application because I would need to access some Sharepoint site's data) to my sharepoint site in IIS and manually edit site's web.config file to register my HTTP module and add my custom configuration section as well either putting my DLLs into GAC or put them in the _app_bin (so I don't have problems with CAS), but I don't think that's a good thing to do, because this web application may get deployed in an environment where this shouldn't/couldn't be possible. So I figured I could build a WSP using Visual Studio 2010 and deploy it that way. But I don't have enough experience doing that.

I created a new sharepoint 2010 project. Is there a way I could add all non-executable application files (aspx, ascx) at once? I've seen the advanced tab of the WSP package where I can add my DLLs either to bin folder or GAC. I don't know whether I would also have to add any safe control and register certain classes?So I suppose I need some pretty detailed and explanatory guidance here.

View 1 Replies

C# - Page Inheritance In Custom Sharepoint Application?

Aug 2, 2010

I have a default.aspx in a folder _layouts/sandbox on the sharepoint server.

It has the following code:

using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;

[Code]....

View 1 Replies

Web Forms :: Accessing An Object From A Sub?

Aug 19, 2010

My form calls a sub for the onclick of the submit button. I need to access the form element with id 'form1' from this sub. I know in javascript its document.getElementById but how is this done in ASP.NET VB? And Yes I do realize I just showed off how much of a newb I am to the language but this seems to be so easy that its almost unsearchable on google.

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved