Configuration :: Web App Forms Authentication Vs Sharepoint Services
Apr 22, 2010
I am having difficulty getting an asp.net web application to run on a new server. This same app has been deployed to at least a dozen other servers without issue. The x-factor seems to be that Sharepoint Services (WSS 2.0) is present on the new machine.
The app is configured to use Forms Authentication with a redirect to a specified login page, the first symptom is that no attempt is apparently made to redirect new requests, requests proceed directly and then error out when that page attempts to look at the HttpContext.Current.User.Identity.Name.
Second, when navigating directly to the Login.aspx page, the login and authentication check appear to proceed normally, but again HttpContext.Current.User.Identity.Name is blank where is should now have the users login name, and an application error occurs. I have confirmed that the same code on other servers behaves as expected (the Name is set at this point). IIS virtual directory settings are identical as well.
It would seem that something is interfereing with the normal Forms Authentication processes and that something appears to be Sharepoint. We have already listed the web app's path as excluded in the Sharepoint Admin section. Is there something else that needs to be done?
View 2 Replies
Similar Messages:
Apr 3, 2010
I am using Visual Studio 2010 Release candidate1. I have to deploy my web application which consists of a website, certain window services, certain WCF services and Sql Server 2005 database.I read Vishal Joshi's blog(http://vishaljoshi.blogspot.com/2009/09/overview-post-for-web-deployment-in-vs.html) detaing Web Package in VS2010. I want to know how to deploy window services and WCF services using Web Package. Also, I want to create a web setup (.msi) for deployment instead of Web Package so that the .msi takes care of all the application and database deployment like the web package does.
View 1 Replies
Apr 5, 2010
We have created an ASP.NET web app that upload files to WSS Doc Libary. The files get added under 'SYSTEM ACCOUNT' in the library. The FullTextSqlQuery class is used to search the document libary items. But it only searches files that has been uploaded by a windows user account like 'Administrator' and ignores the ones uploaded by 'SYSTEM ACCOUNT'. As a result the search results are empty even though we have the necessary data in the document library. What could be the reason for this?
The code is given below:
public static List GetListItemsFromFTSQuery(string searchText)
{
string docLibUrl = "http://localhost:6666/Articles%20Library/Forms/AllItems.aspx";
List items = new List();
DataTable retResults = new DataTable();
SPSecurity.RunWithElevatedPrivileges(delegate
{
using (SPSite site = new SPSite(docLibUrl))
{
SPWeb CRsite = site.OpenWeb();
SPList ContRep = CRsite.GetListFromUrl(docLibUrl);
FullTextSqlQuery fts = new FullTextSqlQuery(site);
fts.QueryText =
"SELECT Title,ContentType,Path FROM portal..scope() WHERE freetext('" +
searchText +
"') AND (CONTAINS(Path,'"" +
ContRep.RootFolder.ServerRelativeUrl + ""'))";
fts.ResultTypes = ResultType.RelevantResults;
fts.RowLimit = 300;
if (SPSecurity.AuthenticationMode != System.Web.Configuration.AuthenticationMode.Windows)
fts.AuthenticationType = QueryAuthenticationType.PluggableAuthenticatedQuery;
else
fts.AuthenticationType = QueryAuthenticationType.NtAuthenticatedQuery;
ResultTableCollection rtc = fts.Execute();
if (rtc.Count > 0)
{
using (
ResultTable relevantResults =
rtc[ResultType.RelevantResults])
retResults.Load(relevantResults, LoadOption.OverwriteChanges);
foreach (DataRow row in retResults.Rows)
{
if (!row["Path"].ToString().EndsWith(".aspx"))
//if (row["ContentType"].ToString() == "Item")
{
using (
SPSite lookupSite =
new SPSite(row["Path"].ToString()))
{
using (SPWeb web = lookupSite.OpenWeb())
{
SPFile file = web.GetFile(row["Path"].ToString());
items.Add(file.Item);
}
}
}
}
}
} //using ends here
});
return items;
}
View 1 Replies
Jan 4, 2011
1) I have an ASP.NET website which is the main entry point in the application.This website uses Forms authentication, which validates credentials (username/password) against a database. 2) Once logged on the website, the user is displayed a page containing several links which point to a Sharepoint 2007 application, where authentication is managed by an Active Directory. 3) Every user in the Active Directory is duplicated in the database managing the ASP.NET website authentication.
View 1 Replies
Aug 13, 2010
Is it possible to share the claims based authentication of a logged in Sharepoint 2010 user with a separate Asp.net application?
The following article describes how it was done using Sharepoint 2007 and forms authentication through forms auth and sharing machine keys etc however I cannot find any information regarding the external application consuming the claims authentication that is now used in Sharepoint 2010?
View 2 Replies
Mar 4, 2011
I got a ASP.Net webforms app which is using Forms authentication. It needs to authenticate against a webservice which uses windows authentication (+ impersonation).
I've tried (amongst other things) to supply credentials by using:
service.Credentials = new NetworkCredential(myUserName, thePassword, theDomain)
The problem is that I get 401 from the webservice no matter what I try.
View 2 Replies
Feb 16, 2010
I have an ASP.Net website with the standard forms auth membership database, and then a Reporting Services instance with a bunch of reports on it.
How can I integrate the security between the two servers? Worst case, I could just frame in the reports with some code and pass a universal set of credentials to the Reporting server, but I lose security granularity...I could pass the current set of credentials the same way, but then I have to keep the two db's synched. There has to be a better way.
View 1 Replies
Nov 18, 2010
We have a link in our site that pin points to sharepoint documents and we are retreiving some documents files (*.doc). Our sharepoint uses IWA (integrated windows authentication) which is prompted if we're trying to access that documents, unfortunately we don't want to prompt that window to authenticate the user. We need is to create a username and password and authenticate it. how can we do that.
Note* we have 2 server one for our application and the other one is for sharepoint.
View 3 Replies
Mar 9, 2010
I am trying to implement custom sercurity modal in Reporting Services and i am not successfull. I am getting instance count error at below line.
// Loop through the instances of the server class.
ManagementObjectCollection instances = serverClass.GetInstances();
I posted my question in the below forum and could not get answer yet.
http://social.technet.microsoft.com/Forums/en-US/sqlreportingservices/thread/81b5a886-cca5-4d13-9805-c5b57c8a20e9
The link i used for forms authentication is as follows:-
http://msdn.microsoft.com/en-us/library/aa902691(SQL.80).aspx
What could be going wrong? Why i could able to cross "scope.Connect();" AND "serverClass.Get();" and getting below error
and could not get any instances. I saw a help link of similar problem and given full permission, but could not get instances at all.
http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/fd5d19da-5cf5-45a9-bc77-7849a9565714
Exception Info:-
serverClass.GetInstances() {System.Management.ManagementObjectCollection} System.Management.ManagementObjectCollection
+ Count 'serverClass.GetInstances().Count' threw an exception of type 'System.Runtime.InteropServices.COMException' int
{System.Runtime.InteropServices.COMException}
IsSynchronized false bool
Code:-
const string WmiNamespace =
//@"\localhost
ootMicrosoftSqlServerReportingServicesv8"; // ORIGINAL
@"\localhost
ootMicrosoftSqlServerReportServerv9Admin"; // NEW ONE
//@"\localhost
ootMicrosoftSqlServerReportingServicesv9Admin"; // NOT
WORKING COPY
const string WmiRSClass =
//@"MSReportServerReportManager_ConfigurationSetting"; // ORIGINAL
// @"MSReportManager_ConfigurationSetting";
@"MSReportServer_ConfigurationSetting"; // NEW ONE
string fullWmiClassName = WmiNamespace + ":" + WmiRSClass;
ManagementClass serverClass;
ManagementScope scope;
//scope = new ManagementScope(WmiNamespace, connOptions);
scope = new ManagementScope(WmiNamespace);
// Connect to the Reporting Services namespace.
scope.Connect();
// Create the server class.
serverClass = new ManagementClass(fullWmiClassName);
// Connect to the management object.
try
{
serverClass.Get();
}
catch (Exception ex)
{
throw new Exception("Could not get WMI information. "
+ ex.Message);
}
View 3 Replies
Mar 25, 2011
I am facing error when I am deploying Visual Webpart in Sharepoint . Then its showing following error Could not load file or assembly 'Microsoft.Practices.ObjectBuilder2, Version=2.2.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
View 1 Replies
Jan 10, 2011
Ive integrated a custom asp.net web application into a Sharepoint site by creating a virual directory, that contains my web app files, that points to a directory in the Sharepoint inetpub folder.
On my local dev server I can access all my web app pages just fine by typing in /virtualdirectoryname/page.aspx
My Problem is that: When I deploy to my Live Test server that is internet facing, none of the pages that make a MS-Access database call will work.
The Error I receive is '[SecurityException: Request for the permission of type 'System.Data.Odbc.OdbcPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.]'
I have researched the issue online and tried numerous solutions which include giving all the assemblies in my application a strong name, and modifying the security policy to trust this strong name.
My Custom Web App consists of 2 projects
1. A Class Library Project (Data Layer)
2. A Web Application Project (Web Layer)
My .mdb database file is stored at root level within the Virtual Directory.
I have 1 class in the Data Layer (ClassConnect.cs) that when instantiated, creates the ODBC connection for all other pages to use (OdbcConnection dbConn = new OdbcConnection();)
I have a Connection String stored in the web.config file that is as such. When I deploy to the Live Test Server I change the path in this connection string, because I haven't figured out yet how to get a relative path that works.
I also place the dll's for my 2 projects in the Sharepoint bin folder.
Could anyone suggest what might be the dfference between my Local Dev Server and the Live Test Server and why I might be getting these errors.
View 1 Replies
Oct 19, 2010
How to implement AD(AD users) + FBA(external users, suppliers and job seekers) login option in SharePoint 2007 internet bilingual site. How to proceed with this?
View 1 Replies
Jun 29, 2010
The webapp I am trying to deploy will have the IIS running on the same server as database.I have been assigned a domain account and have been asked to connect to the database using this account.I am not sure how to go about making the connection. I cannot enable impersonation as I need to mention the username and password and it will be security concern, also I need to give write permission onC:WINNTMicrosoft.NETFrameworkv2.0.50727Temporary ASP.NET Files (which is not allowed)The Webserver and SQL server runs with system account.Can you please let me know how to establish connectivity to the server using the domain account without mentioning the password anywhere.
View 1 Replies
Oct 7, 2010
I have an AJAX web application.ASP pages are accessing various Web Services that are part of the application using standard Microsoft .NET AJAX extension APIs.Now, I have to call some of the web services from the Windows app.It works when I add web reference to a project on my local development machine.
View 1 Replies
Dec 27, 2010
i have created simple hello world WCF services it is working fine in local machine but when i try to uploaded to the server and then run that service it not at al start like http://localhost:8080/wcf/helloservice.svc
i am trying to modified the webconfig file <endpoint> address i have changed to my servername.com/wcf/helloservice.svc again it shows error can give usefull link to creation and deployment to the server
View 1 Replies
May 14, 2010
I have some services deployed on [URL]I want to move them to [URL]. I have [URL] physically hosted & has its own web.config file. No inheritance issues...
I configured the subdomain (through my host--I don't actually own the web server) so that the subdomain is physically hosted & made sure it's running as an IIS application.
When the services lived on [URL], I used the following address prefixing in web.config:
[Code]....
Now that they're on [URL], I modified the web.config to read:
[Code]....
<serviceHostingEnvironment aspNetCompatibilityEnabled="true">
View 1 Replies
Feb 4, 2011
How to Find All the Web Services and Windows Services Running on a Server in ASP.Net. I have the server details with me and want to find all the Web services running on it.
View 1 Replies
Nov 3, 2010
I have an ASP.NET MVC application running on IIS. In my web.config I defined following section responsible for forms authentication:
<authentication mode="Forms">
<forms
loginUrl="~/Account/LogOn" [code]....
Why do I get a different address from the one defined in web.config?
UPDATE: The "/VNK/site/" prefix is not a problem here. The problem is that LoginUrl property of FormsAuthentication class does not reflect the value from web.config. It means that if I change in web.config loginUrl from "~/Account/LogOn" for example to "~/foobar", FormsAuthentication.LoginUrl still has value of "/VNK/site/Account/Login". Why ?
View 3 Replies
Jan 12, 2011
I have deployed a custom SharePoint Web service on Farm A. I am trying to access this Web service from a SharePoint timer job on Farm B. On Farm B, I am creating Class Library project, packaging it (wsp) and then deploying to GAC. The problem is I'm unable to access the Web Service using the following code. TodaysNewSVC is a service reference
TodaysNewSVC.GetTodaysnewsfromInsite objGetNews = new TodaysNewSVC.GetTodaysnewsfromInsite();
objGetNews.PreAuthenticate = true;
objGetNews.Credentials = CredentialCache.DefaultCredentials;
objGetNews.Url = "http://insite-dev.portal/_vti_bin/todaysnews.asmx";
DataTable dt2 = objGetNews.getNewsFromInsite(true, true);
//getNewsFromInsite is a WebMethod which returns the DataTable.
Note: Both farms use the same active directory authentication. I have also done the debugging for Timer Job and feature activation and they are working fine. The problem occurs during the call i.e. getNewsFromInsite
The asmx and wsdl files are accessible from Internet Explorer and also from Windows Console application. Here is the code which I use from console application:
GetTodaysnewsfromInsiteSoapClient objWSClient = new GetTodaysnewsfromInsiteSoapClient();
objWSClient.ClientCredentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;[code]...
Here is the error message:The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a href="%2fPages%2fproblem-with-page.aspx%3fc%3d500">here</a>.</h2>
</body></html>
View 1 Replies
Jun 16, 2010
It seems the Print Icon in Reporting Services is now throwing up a Windows Authentication box. Even when entering my domainusername and password, nothing happens. It just keeps popping up?
Our reporting service URL is a http://IP Address/........
Not sure if that has anything to do with it. We did add the I.P. in the Local Intranet Zones but still nothing works.
View 1 Replies
Sep 28, 2010
I have "published" my web application to our server which is running Windows Server 2008 and IIS 7. The app has a web.config file in it's root directory but, since I used the ASP.NET Configuration tool to set access permissions to subdirectories in my site, there are also web.config files in those subdirectories. They were created by the ASP.NET Configuration tool, and their contents are simple:
[Code]....
Now, when I try to view my app/site, I recieve the following error: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS. In the Source Error: section, the following line of my ROOT web.config file (not on of the little ones located in the subdirectories) is highlighted in red. "<authentication mode="Forms">"
Everything I have been able to find regarding this error says that one cause might be that web.config files are located in the subdirectories of my application but, the error is pointing to the web.config file in my root directory. IIS7 functions differently from previos versions, regarding web application creation. But, I think I have managed to get that set up correctly. (there is an application listed with the name of my site, and it has been assigned to the app pool that I created so, I think that is all correct). So, I think my web site IS set up as an application.
View 2 Replies
Aug 30, 2010
I've got an MVC 2 app that works fine when launching from VS 2010. However, when I deploy (using File System on the server in the same box) and attempt to run I get the error shown below. The wierd thing is that the Physical path shows: C:inetpubwwwrootWorksheetsSiteWorksheetsAccountLogOn which leaves out the "View" folder in the path.
[Code]....
View 12 Replies
Nov 1, 2010
Recently, I developed an Intranet web app. I implemented windows authentication to capture user details, its working fine when I am browsing on my local machine, But its prompting for usesrID/Pswd for multiple times while browsing on other machines.
configurations (If any) to be done in IIS to implement this even without single login prompt.
Browser: IE6
View 5 Replies
Oct 21, 2010
my ASP.NET app works fine on my development PC, but when I deploy it on the server, the Forms Authentication won't work. The page is being redirected to the "login.aspx" page, but when I enter a valid username/password and hit the login button, it also goes to the login.aspx page (with no errors and no throw, it keeps like this forever).
I am using the default ASP.NET Membership provider, I have setup the hosting server to be exactly as my PC, so both have same settings of IIS, ASP.NET 4.0 Global Configuration (in IIS), and SQL Server 2005 Express Edition.
I searched for this problem in google and tried several suugestion (like removing the clear() in web.config, manually add the membership/role provider in web.config, change security in the physical folders, etc...) but with no luck.Below is my web.config (which is working fine in my development PC): [Code]....
View 17 Replies
Feb 24, 2011
im using visual studio 2008. in my project im using forms authentication,my project structure is as follows
root
|
login.aspx
home.aspx
web.config
admin (folder)
|
admin.aspx
web.config
root web.config is as follows
[Code]....
and inner web.config is
[Code]....
and my users are
Username Role
admin1 Admin
admin2 Admin
user1 User
user2 User
as you can see that in second web.config, i gave access to users with "Admin" role and "user1" user.
for giving access to "admin" folder, i wrote the following:
[Code]....
and saved the web.config as
[Code]....
this is working fine when i run it from visual studio development server, when i host it in IIS, im getting the following error
[Code]....
here the problem is, it is not able to save the web.config i got one solution, that is, i added
[Code]....
View 1 Replies