.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

AD Works

Posted By:      Posted Date: September 21, 2010    Points: 0   Category :SharePoint


I have 2 domains: Alpha & Omega.

Sharepoint frontend is on Alpha.

I want to make changes in Omega Active Directory from Sharepoint Workflow.

When working WF uses credentials of application pool, which is set to Alpha\SPFarmer.

But AD admininistrator says that it is impossible to give right to change anything in Omega domain with Alpha account.

So is it possible to override app pool`s credentials in code layer, to set it to Omega account ?


View Complete Post

More Related Resource Links

Code works on aspx but not ascx


Not sure which category to put this question in, so I will put it in here.

Just to give you an idea of the layout of my solution, I have the main project, along with 2 class libraries, BLL and DAL.  (Business Logic Layer and Data Access Layer)

The BLL refers to the DAL and the main project refers to the BLL.

I had a test website and the code worked fine, but the same code will not work on the real project. The only difference is that in the test project, the code was on an aspx code behind, whereas in the real project, it is an ascx code behind (Web User Control )

The code is:

Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString
        Dim recordEntry As New UserRecord(connectionString)
        recordEntry.UserName = "TestName"
        recordEntry.BMI = bMI
        recordEntry.BMR = bMR
        recordEntry.FTM = fTM
        recordEntry.TDEE = tDEE
        recordEntry.TodayDate = dateForToday

Dim connectionString As String = ConfigurationManager.ConnectionStrings("ASPNETDBConnectionString").ConnectionString

HttpHandler works with Visual Studio Development Server debugging, but not otherwise


Hi all,

I'm new to HttpHandlers.  I am writing an HttpHandler that reads uploaded files directly from the request stream to provide progress that can be queried using an AJAX request.  For large files, this seems to be faster than having ASP.NET load the file contents into Request.Files and then streaming the file from there to wherever it goes (Linq to SQL into a VARBINARY column in an SQL Server database.)

My HttpHandler works perfectly when I'm debugging using the Visual Studio Development Server, but doesn't work otherwise.  The application pool for this application in IIS 7 is set to run in Classic Mode, and the Handler Mappings screen in IIS says that I must manage managed handlers in system.web/httpHandlers. 

I set up in my applications Web.config file.

<add verb="GET,POST" path="*.upload" type="Namespace.For.UploadHandler, AssemblyForUploadHandler"/>

It works great, so long as I don't debug with the "Use Local IIS Web server" option.

What else do I need to do to get this to work?


FAST Search for SP2010 scope setting works but not getting results.



I am trying this from last two days , but it does not work. I have created two scopes for FAST Search Query SSA , they appear in search center , but I am not getting any results back. I see them being fired in the FAST query log.

First one is a simple one:

New-SPEnterpriseSearchQueryScope -SearchApplication "FAST Query SSA" -Name DCO -Description "All DCO Documents" -DisplayInAdminUI 1 -ExtendedSearchFilter "ContentSource:DCO"

Content source is a managed property. and i can just query "contentsource:dco" from the text box which gives me results.

When I fire the query i see it in FAST Search query log

"GET /cgi-bin/search?qtf_keyword:context=ssgid%3a%3a4d020606-8532-45d8-b09a-db11283cccb4%7cSPS-Location%3a%3a%7cSPS-Responsibility%3a%2c%3a%7c&rpf_navigation:hits=50&rpf_navigation:enabled=True&spell=suggest&qtf_parsekw:timezone=10&type=kwall&qtf_teaser:dynlength=185&resubmitflags=8192&language=en&query=CASHIERING&sortby=%2bdefault&qtf_lemmatize=True&offset=0&version=

Toggling of iFrames works fine in Firefox but not in IE


I have different iFrames on my page and one of the iFrame has pdf plugin that shows the PDF document and i have another iFrame that pops up on delete button click and  a function to toggle the iFrames. It works fine in Firefox but in IE my pop up iFrame is always behind the PDF. 
Any thought how can I set it right, there is some issue with the z-index of PDF, it is set to infinity something like that in IE ! 


Login control is suddenly broken in IE7 but works perfectly on Firefox (It works on both browsers lo


Hey Guys,

 I'm new around and I thought this is probably the best place to help me solve my dilemma, I am developing a website for almost a year now and the login control was implemented a logn time ago, however all of a sudden it will not authenticate on Internet Explorer 7 when the application is published, it doesn't even provide a message that authentication was unseccssful or throws any error, it just refreshes the same page. however this problem doesn't occure when I try the same website on FireFox 2.0...Also when I run the page locally on Cassini it work great on both browsers...This is one of the weirdest errors I have ever faced. what could have gone wrong on the server side to cause this? knowing nothing changed on the server-side...I'll provide a snapshot of the login control below

<asp:Login ID="LoginControl" runat="server" BackColor="Trans

Javascript fails in chrome and firefox, works fine in IE



I am customizing Newform.aspx i.e. hiding some fields, making other readonly etc. It works fine in IE but fails miserably in chrome and firefox i.e. readonly are no more readonly, hidden are no more hidden. Here is my code:

<script language="javascript" type="text/javascript">
    function autoFillFields()
       var ctrl = findacontrol("Reference Customer");
    var param = getURLParam('RefFromCust');   
    var properParam = replaceCharacters(param);
    ctrl.value = properParam;
    var ctrl = findacontrol("RefReqOpptyId");
    var param = getURLParam('OpptyId');   
    var properParam = replaceCharacters(param);
    ctrl.value = properParam;

    param = getURLParam('RefFromAE');
    properParam = replaceCharacters(param);
    setPeoplePicker("People Picker", properParam);
    hideFldCtrl("Approval Sta

Calling a webservice in MVC using jquery works on dev box not prod box


I have a webservice that is part of the MVC project.  I am using VS 2010 MVC 2.0 on Windows 7.  When I run the web application locally the webservice call works flawlessly, however on the prod box using  2008 upgraded with asp.net 4.0 it fails.

I get an error "The controller for path '/services/traxservices.aspx/upDateCustomer' was not found or does not implement IController. "

Is there some type of issue with the settings in the global.ascx or in IIS that I am missing?


Any help would be appreciated.

[WPF 4] Win7 Touch not works on custom desktop (CreateDesktop, SwitchDesktop)

I am working on an application which should run on a custom desktop created by the CreateDesktop Win32 method. The desktop switching and the custom desktop works well. My application uses WPF 4 with C# and should work on a Win7 based notebook with touchscreen. When running on the normal desktop everything works fine, but when I try to run it on my custom desktop the touch screen does something strange. When I try to click a button using touch, the button visually responds (so the buttons background will be light blue as normally under Vista/7), but the click event never occurs, if I click the button using the mouse everything works fine. > I did some tests and got the following results: [WPF and WinForms] Both mouse and touch events work well on the normal desktop in every case [WPF] Touch events DO NOT WORK on the custom desktop (for eaxmple TouchDown never fires) [WPF] Mouse events with the mouse work well on the custom desktop (Click with mouse) [WPF] Mouse events with touchscreen DO NOT WORK on the custom desktop (Click/Tap with finger) [WinForms] Mouse events with the mouse work well on the custom desktop (Click with mouse) [WinForms] Mouse events with touchscreen WORK WELL on the custom desktop (Click/Tap with finger) > I have also tried some other apps on the custom desktop: Paint works well, also with multi-touch. Touch Keyboard works well. Windows can b

this my query works fine, i need to eliminate when resultset zero

hithis is the query working fineSELECT a.Selection,a.SizeRange,a.Thickness,       ISNULL(a.Assotment,0) - ISNULL(b.Issue,0)  AS difference1      FROM ( SELECT Selection,SizeRange,Thickness,                SUM(Pcs) AS Assotment            FROM  dbo.WBCAssortDescp where LotNo='LWC2'          group by Selection,SizeRange,Thickness) AS a LEFT OUTER   JOIN (SELECT Selections,SizeRange,Thickness,                SUM(Pieces) AS Issue            FROM dbo.WBIssue Where LotNo='LWC2'           group by Selections,SizeRange,Thickness) AS b on b.Selections=a.Selection and b.SizeRange=a.SizeRange and a.Thickness=b.ThicknessSELECT a.Se,a.Si.Th,      ISNULL(a.ent,0) - ISNULL(b.Ise,0)  AS difference1   FROM ( SELECT Se,Si,Th,               SUM(Pcs) AS ent           FROM  dbo.Table1where No='C2'         group by Se,Si,Th) AS aLEFT OUTER  JOIN (SELECT Ses,Si,Th,               SUM(Pieces) AS Ise         &nbs

Generic Audit Trigger CLR C#(Works when the trigger is attached to any Table)

This Audit Trigger is Generic (i.e. non-"Table Specific") attach it to any tabel and it should work.  Be sure and create the 'Audit' table first though. The following code write audit entries to a Table called'Audit' with columns 'ActionType'    //varchar'TableName'    //varchar'PK'    //varchar'FieldName'    //varchar'OldValue'    //varchar'NewValue'    //varchar'ChangeDateTime'    //datetime'ChangeBy'    //varchar using System;using System.Data;using System.Data.SqlClient;using Microsoft.SqlServer.Server; public partial class Triggers{//A Generic Trigger for Insert, Update and Delete Actions on any Table[Microsoft.SqlServer.Server.SqlTrigger(Name = "AuditTrigger", Event = "FOR INSERT, UPDATE, DELETE")] public static void AuditTrigger(){SqlTriggerContext tcontext = SqlContext.TriggerContext; //Trigger Contextstring TName; //Where we store the Altered Table's Namestring User; //Where we will store the Database UsernameDataRow iRow; //DataRow to hold the inserted valuesDataRow dRow; //DataRow to how the deleted/overwritten valuesDataRow aRow; //Audit DataRow to build our Audit entry withstring PKString; //Will temporarily store the Primary Key Column Names and Values hereusing (SqlConnection conn = new SqlConnection("context connection=true"))//Our Connection{conn.Open();//Open the Connection//Build the AuditAdapter an

visual editors and checkers that works with Microsoft's SQLXML

Are there visual editors and checkers that works with Microsoft’s SQLXML to creat sql annotations in XSDs?   How would I use annotations when an element in a schema is a reference to another schema?  

Maintenance Plan Works, But Not Through SQL Job

If I am in the wrong sub-forum, please let me know where I belong. I submitted this issue to this sub, b/c I believe I have an accessibility issue. I have a maintenance place that executes a stored proc. The stored proc is as followings: CREATE PROCEDURE spFirst     @Err AS INT = -1 AS     EXEC @Err = xp_cmdshell 'dir C:\temp\*.exe'     EXEC msdb.dbo.sp_send_dbmail @profile_name = 'Mail_Proj',                                        @recipients = 'me@xyz.com',                                              @body = 'Complete',                                           @subject = 'Dir Listing' The proc runs successfully and when done, I always get an email message in my Inbox, as expected. When the proc is executed directly from the maintenance plan, it still runs successfully, and the email message is successfully received in my Inbox. A SQL Job was setup to run the maintenance plan. The history of the job indicates that it is completing successfully, but this cannot be true, as my inbox never receives the expected email

Can't connect to SQL 2005 Enterprise using Management Studio with Server Name (only (local) works

This is a test system, everything running locally & no domains. Win 2003 Ent. Server & SQL Server 2005 Enterprise. I can't log into SQL Server Management Studio using the server name & using either Windows Authentication or SQL login. If I change the name of the server in the drop-down list to "(local)", I connect just fine (both Windows & SQL security modes). Shared Memory, Named Pipes & TCP/IP enabled in both server & client. Remote connections allowed. I have IP adresses (both & external IP) in my hosts file pointing to the server name. Does SQL require a DNS server? This wouldn't be a problem except for the fact that I can't install SQL 2005 SP3 due to authentication failure since there's no way to enter (local) as the server name. SQL tools (management studio, SP install) seem to see the SQL server running but won't authenticate the user through any means other than setting server name to (local). This is driving me crazy!!!

Execute an SSIS package from ASP.net (C#) - my package keeps failing. Help! - Works on localhost but

I'm looking for any and all information on how to execute an SSIS package from my asp.net web site. I have written the call and when I run the application from (Localhost) it works, but when I run it from the server it does not.Here is my code to call and execute the package: public string ProcessFiles(int ClientID, string FileName) { //System.Security.Principal.WindowsImpersonationContext impersonationcontext; //impersonationcontext = ((System.Security.Principal.WindowsIdentity)ServiceContext.User.Identity).Impersonate(); string packagePath = "\\\\\\Customer File Import.dtsx"; Microsoft.SqlServer.Dts.Runtime.Application app; Microsoft.SqlServer.Dts.Runtime.Package pkg; Microsoft.SqlServer.Dts.Runtime.Variables vars; Application integrationServices = new Application(); DTSExecResult result; FileName = FileName.Substring(FileName.Length - 25 , 25); app = new Microsoft.SqlServer.Dts.Runtime.Application(); pkg = app.LoadPackage(packagePath, null); //pkg = integrationServices.LoadFromSqlServer("Customer File Import.dtsx", "", "healthtech\\brian.montfort", "Nightdragon8", null); vars = pkg.Variables; if (pkg.Variables.Contains("

project using ADO.NET & EF works, but not inside customers network...

I'm developing a case management package called SLPortal and I've run into some rather strange problems. Here's the breakdown: It's a .Net 3.5 web app developed in VS2008 using C#, ADO.NET and Entity Framework. Database is MS SQL Server 2005 hosted on Windows Server 2003 Webserver is IIS6 on Windows Server 2003 It's hosted from within the Boise State University LAN. The test system at my house runs 'fine' in that most everything works as intended, aside from the occasional bug from my inexperienced code. Here's the key issue: It seems like when we (myself and the testers) log into the system from on campus, all 'Create' functions quit working, with one exception: I used the Microsoft asp.net MembershipProvider tables to handle the User and Roles functionality. They are built into the FACULTYINTAKE database. All Create, Update, and Delete functionality for these tables work correctly, but note that I am strictly using the MS provided functions to interact with it. I can use the system from home and off the BSU campus and it works. The test systems run Windows XP Pro sp3, Vista Business x86 (32 bit), and Windows Server 2008 64bit using Internet Explorer 7 and 8, Firefox, Safari 4, and Chrome. There are hiccups, but all the database stuff works. When we attempt to use the system from BSU, anywhere on the BSU

Can WCF works well via a Proxy only supports http1.0?

Hi,everyone does anybody know , WCF can or can't  works well via a Proxy only supports http1.0? I found a discussion 3years ago http://social.msdn.microsoft.com/forums/en-US/wcf/thread/314ad4c6-a41b-481a-931e-0d631be696a8 Anything changed since then?   If nothing changed, is there any official document  said clearly: [No, It not works via http1.0] I only found a document tells me [Yes, http1.1 is OK] http://msdn.microsoft.com/en-us/library/ms734776.aspx   Thanks!

Javascript Error in Internet Explorer but works fine in Firefox

Hi All,i was working on one of the project as it is working fine in Firefox but it is giving the javascript exception in internet explorer.Errror:  Error says  "s" is undefined in the s.currencyCode="USD" line but "s" is defined in the external javascript file  s_code.jsCan anyone suggest the solution for this issue:Please find my code where the error is displayed <script type="text/javascript" language="JavaScript" >var s_account="mnsdev"</script><script type="text/javascript" language="JavaScript" src="http://media.world.com/ads/usen/rpt/Omniture/s_code.js"></script><script type="text/javascript" language="JavaScript" >s.currencyCode="USD"s.charSet="ISO-8859-1"s.SEMct = s.getQueryParam('s_kwcid');s.SEMct = s.getValOnce(s.SEMct,'SEM_ct',0);s.clickPast(s.SEMct,'event9','event10');s.SEMvar=s.getQueryParam('s_kwcid');s.SEMdate=new Date;s.SEMdate.setTime(s.SEMdate.getTime()+60*86400000)if(s.SEMvar){s.c_w('SEM_ck','1',s.SEMdate)}s.SEMchk=s.c_r('SEM_ck');if(s.SEMchk&&s.events)s.SEMok='ok';if(s.SEMvar||s.SEMok) s.t()
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend