Thursday, February 24, 2022

Cannot access the server after adding additional external ip address to server

Cannot access the server after adding additional external ip address to server

Hello Team,

I have deployed a windows service .net application on windows server 2008, which I can access the application using localhost and server ip address in server environment.But I am willing to access the server outside the server then I have added additional ip to my server from control pannel>chnaged adapter settings>advanced>added additional ip address and DNS entry, DHCP and default gateway are same.

After doing the above, I am unable to rdp to it complaining the server is not in network. I understand in AZURE VM ware I guess ip address needs to assign to server in some where but to do anything I am unable to connect to server itself.

Please suggest 

thanks,


Reply:

After doing the above, I am unable to rdp to it complaining the server is not in network. I understand in AZURE VM ware I guess ip address needs to assign to server in some where but to do anything I am unable to connect to server itself.

Hi,

Could it be that you no longer have an Endpoint for RDP, in your Azure VM?

Each virtual machine that is created should have a remote desktop endpoint for the VM at port 3389. If this endpoint is deleted then a new endpoint must be created. The public port can be any available port number. The private port (the port on the VM) must be 3389.

You can manage your VM´s endpoints using the New Management Portal, like it is demonstrated here: https://www.windowsazure.com/en-us/manage/windows/how-to-guides/setup-endpoints/

Hope this helps!


Best Regards,
Carlos Sardo



------------------------------------
Reply:
Hi end point is not deleted, I can still see the end point.

------------------------------------
Reply:

Based on the header of this discussion wondering how you could add an additional IP address to a VM server. Can you please elaborate.

Thanks

Jagdish


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

SQL Native Client for Linux: Please convert C++ comments to C comments in sqlncli.h

Hello,

I am using pure C and gcc warnings give me:

/dbs/64bits/snc/11.0/include/sqlncli.h:4:1: warning: C++ style comments are not allowed in ISO C90

ODBC is first designed for C programming, and should only contain C-style comments.

Thanks.

automate test prep using visio and excel

Hi everyone,

I want your help and guidance in automating test preparation by writing a code in <acronym title="Visual Basic for Applications">VBA</acronym>.

The concept is : The user draws the a flow chart using microsoft visio and then by using <acronym title="Visual Basic for Applications">VBA</acronym> macro the flowchart information is converted into excel sheet.

Guys, please let help me and let me know if you need more clarification on the concept.

If you have any ideas or frontend interfacing that can be created for the above concept, please help me create it.

Thank you.


Reply:

There are examples of using VBA to analyze drawing connectivity in the Visio SDK (v2010), there are numerous examples of to and from Excel over on Chris Roth's site (www.visguy.com).

http://www.visguy.com/2009/04/08/path-analysis-in-visio/

al


If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Al Edlund Visio MVP


------------------------------------
Reply:

Sir, i would need more help of yours...

Scope of my concept:
                          With the use of Microsoft Visio, testers can
design and display test cases in a hierarchical form using flowcharts.
The scope is to, create utilities in VBA macros whose functionality
will be to address below 5 objectives:

        1. Produce automated test scripts using the Microsoft Visio information
        2. Upload generated test scripts in HP Quality Center
        3. Regenerate test cases when Visio shapes (flowchart design)
are modified
        4. Estimate high-level test case points for test case generation
        5. Reverse engineer test cases written in Excel sheets back to
Microsoft Visio flowcharts

Sir, I please need your help and guidance on the same. I also feel I
need to enhance my scope, since I have visibility only in terms of a
software tester, I would need your help to enhance the scope of this
so much so that it will be useful in daily usage for testers
all around the world.


------------------------------------
Reply:

What you're attempting to do is a significant (time and expense) piece of work best accomplished by a professional developer. Certainly requiring a lot more than the casual input via a forum. I'd suggest working with somebody (a consultant) to assist you.

Al


If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Al Edlund Visio MVP


------------------------------------
Reply:

Hi Al,

Its very nice to have a reply from you.

I am not able to find anyone. Do you know anyone? Or Can you assist me to do it?

Thanks & regards,

lololaku


------------------------------------
Reply:

Hi Al,

Can you please share me the best books to refer for the same?

Regards,

lololaku


------------------------------------
Reply:

Both Chris Roth (www.visguy.com) and John Marshall (visio.mvps.org) have lists of books to support Visio development. My choices start with David Edson's introduction, any of Graham Widemans in depth developer assistance, and finally David Parkers book on linking Visio to data.

for the test methodologies I'd suggest doing a Google search,

al


If this answer solves your problem, please check Mark as Answered. If this answer helps, please click the Vote as Helpful button. Al Edlund Visio MVP


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

Need microssoft link to download Visual Studi 2010.

I am looking for Visual Studio 2010 Software . Please provide the exact link to download from Microsoft as I need to work on the Development.

Thanks In advance


Reply:
https://www.google.com/search?q=visual+studio+2010+download

------------------------------------
Reply:

Here you go...

http://www.microsoft.com/visualstudio/en-us/try


Hrishi Deshpande – Senior Consultant DeltaBahn
Blog | < | LinkedIn

Please click Mark As Answer; if a post solves your problem or Vote As Helpful; if a post has been useful to you.This can be beneficial to other community members reading the thread.


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

Windows Firewall - HDMI Issue

Hi

 When I was installing SQL server 2012 in windows 7 machine  I received windows firewall warning. To solve the warning I followed this steps 

  • To open a port in the Windows firewall for TCP access
  • To open access to SQL Server when using dynamic ports

given in   http://technet.microsoft.com/en-us/library/ms175043.aspx . 

After this setup I am getting problem in my TV which is connected to Laptop over HDMI. It only displays the background picture of my PC. Before it was working fine.I want to make sure whether these things are related to each other. If yes how to solve this problem.

I hope I am posting my question in the rite place.

Thanks.

 - shammy





  • Changed type Kim Zhou Thursday, September 6, 2012 3:08 AM

Reply:

Beeter platform is here http://social.technet.microsoft.com/Forums/en-US/category/sqlserver

Thank for understanding

Milos


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

I have problem of installing IE8 on Window 7 starter 32 bit, can someone help

I have problem of installing IE8 on Window 7 starter 32 bit, can someone help

Reply:
More specifically, at what stage if the install does the program stop, and what errors/symptoms are you encountering?

Mike Oke MCTS, MCITP (Windows 7)


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

FIM Synch Service

Good Day All.

I have started at a new company and have taken over the admin of all our servers, i have run onto a problem with the SharePoint UPS service.

No i have setup the profile Synch using the habar setup guide witch is very famous around here i see

No i have set it up, but the user profile service just keeps staying at starting, I did a iis reset, server reboot nothing helps still staying on starting, thus now i cant create a new A.D connection because of service not starting, i had a look then at the FIM service's and ding the 2 are not started, So i start the FIM service, cool started, now the FIM Synch, failed to start so i guess this is where my problem lies, upon closer inspection this is the error i am getting.

I am using the domain\spfarm account for the service.

okay, now going to the logs.this is what the logs say

So now i think the problem lies with the database SQL instance, am i right?

this database is sitting on the same server, is this not recommended? we have a main SQL server where i can maybe point it to if it will help?

I did some Google on it and some say to install the hot-fix if you installed SharePoint with a named SQL instance, i did install the hot-fix, but it did not help.

So can some of you Guru's please point me in the right direction to get this issue solved so i can use the UPS service.


The server encountered an unexpected error and stopped.
 
 "BAIL: MMS(9748): storeimp.cpp(308): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
ERR: MMS(9748): server.cpp(373): Failed to connect to the database User Profile Service Application_SyncDB_9fc07911b00f4ade9066daaa5627b70e on Intranet server
BAIL: MMS(9748): server.cpp(374): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
BAIL: MMS(9748): server.cpp(3860): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
BAIL: MMS(9748): service.cpp(1539): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2145188797. This is retry number 0.
BAIL: MMS(9748): clrhost.cpp(224): 0x80131022
BAIL: MMS(9748): scriptmanagerimpl.cpp(7670): 0x80131022
BAIL: MMS(9748): server.cpp(251): 0x80131022
BAIL: MMS(9748): server.cpp(3860): 0x80131022
BAIL: MMS(9748): service.cpp(1539): 0x80131022
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2146234334. This is retry number 1.
BAIL: MMS(9748): clrhost.cpp(224): 0x80131022
BAIL: MMS(9748): scriptmanagerimpl.cpp(7670): 0x80131022
BAIL: MMS(9748): server.cpp(251): 0x80131022
BAIL: MMS(9748): server.cpp(3860): 0x80131022
BAIL: MMS(9748): service.cpp(1539): 0x80131022
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2146234334. This is retry number 2.
BAIL: MMS(9748): clrhost.cpp(224): 0x80131022
BAIL: MMS(9748): scriptmanagerimpl.cpp(7670): 0x80131022
BAIL: MMS(9748): server.cpp(251): 0x80131022
BAIL: MMS(9748): server.cpp(3860): 0x80131022
BAIL: MMS(9748): service.cpp(1539): 0x80131022
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2146234334. This is retry number 3.
BAIL: MMS(9748): service.cpp(1002): 0x80131022
Forefront Identity Manager 4.0.2450.47"
  • Edited by Eon Louw Tuesday, July 17, 2012 7:18 AM

Reply:

Good Day All.

I have started at a new company and have taken over the admin of all our servers, i have run onto a problem with the SharePoint UPS service.

No i have setup the profile Synch using the habar setup guide witch is very famous around here i see

No i have set it up, but the user profile service just keeps staying at starting, I did a iis reset, server reboot nothing helps still staying on starting, thus now i cant create a new A.D connection because of service not starting, i had a look then at the FIM service's and ding the 2 are not started, So i start the FIM service, cool started, now the FIM Synch, failed to start so i guess this is where my problem lies, upon closer inspection this is the error i am getting.

I am using the domain\spfarm account for the service.

okay, now going to the logs.this is what the logs say

So now i think the problem lies with the database SQL instance, am i right?

this database is sitting on the same server, is this not recommended? we have a main SQL server where i can maybe point it to if it will help?

I did some Google on it and some say to install the hot-fix if you installed SharePoint with a named SQL instance, i did install the hot-fix, but it did not help.

So can some of you Guru's please point me in the right direction to get this issue solved so i can use the UPS service.


The server encountered an unexpected error and stopped.
 
 "BAIL: MMS(9748): storeimp.cpp(308): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
ERR: MMS(9748): server.cpp(373): Failed to connect to the database User Profile Service Application_SyncDB_9fc07911b00f4ade9066daaa5627b70e on Intranet server
BAIL: MMS(9748): server.cpp(374): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
BAIL: MMS(9748): server.cpp(3860): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
BAIL: MMS(9748): service.cpp(1539): 0x80230443 (Service start up has failed.  Cannot open the FIM Synchronization Service database because the database schema version in existing database does not match the required version.)
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2145188797. This is retry number 0.
BAIL: MMS(9748): clrhost.cpp(224): 0x80131022
BAIL: MMS(9748): scriptmanagerimpl.cpp(7670): 0x80131022
BAIL: MMS(9748): server.cpp(251): 0x80131022
BAIL: MMS(9748): server.cpp(3860): 0x80131022
BAIL: MMS(9748): service.cpp(1539): 0x80131022
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2146234334. This is retry number 1.
BAIL: MMS(9748): clrhost.cpp(224): 0x80131022
BAIL: MMS(9748): scriptmanagerimpl.cpp(7670): 0x80131022
BAIL: MMS(9748): server.cpp(251): 0x80131022
BAIL: MMS(9748): server.cpp(3860): 0x80131022
BAIL: MMS(9748): service.cpp(1539): 0x80131022
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2146234334. This is retry number 2.
BAIL: MMS(9748): clrhost.cpp(224): 0x80131022
BAIL: MMS(9748): scriptmanagerimpl.cpp(7670): 0x80131022
BAIL: MMS(9748): server.cpp(251): 0x80131022
BAIL: MMS(9748): server.cpp(3860): 0x80131022
BAIL: MMS(9748): service.cpp(1539): 0x80131022
ERR: MMS(9748): service.cpp(988): Error creating com objects. Error code: -2146234334. This is retry number 3.
BAIL: MMS(9748): service.cpp(1002): 0x80131022
Forefront Identity Manager 4.0.2450.47"

Hi,

seems that you have a DB with schema version different from required. This farm has been updated or migrated from old one?

In this case try to force upgrade then you have to create again UPS services but remember to assign user service account correct permission on AD.

Regards


FabioA


------------------------------------
Reply:

Hi FabioA.

This might have been updated with update's, really don't know as i did not install it, so how do i

try a force upgrade? will this then update the SharePoint schema?

Thanks for your reply.

Regards.


------------------------------------
Reply:

Use from command-line psconfig (is the same that exec GUI but works at lower level) to force upgrade of SharePoint and also DB schema version will be alligned.

Ciao

FabioA


FabioA


------------------------------------
Reply:
Cool thanks, so when in the command prompt i use psconfig upgrade? right if so, what does this exactly do, and will SP be offline during this?

------------------------------------
Reply:

Yes, SP will be offline during psconfig execution.

Ciao


FabioA


------------------------------------
Reply:
Another thing of note with this is that you should never have to start the 2 FIM services manually.  These will always get started automatically when the User Profile Synchronization service starts.  If you find that they are not started this would be expected until the User Profile Service starts successfully and has a status of started.

Kyle Rideout - SharePoint Administrator


------------------------------------
Reply:
The schema mis-match issue can also be the result of provisioning the UPS via PowerShell under a context that is different from the Timer Service (owstimer.exe) user.

http://sharepoint.nauplius.net


------------------------------------
Reply:

Hi All.

Firstly thanks for all the responses, i am doing the PSconfig -cmd upgrade now, then after will delete the existing UPS service that i created and then re-setting one up, and see if the service will start successfully then.

Will keep you all updated, once again thanks for the valuable input.

Regards.


------------------------------------
Reply:

Hi All again.

Okay so now i am setting up the new UPS service, but when i do i get a error saying

A SharePoint Database Profile DB already exists, you must supply another name for the new database?

Cant i use the same DB that i did first time around, if not why? and what do i name these new database's then?


------------------------------------
Reply:

Any resolution to the above ? 


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

Stale Computer Reporting for Microsoft Active Direcotry

Active Directory Stale Computer Report

I have created a nice PowerShell script to find your stale / outdated objects in Active Directory.  With being a SCCM Administrator it is crucial you have a healthy AD environment.  

Requirements:

Quest Active Directory CMDLET

Usage: 
.\AD_StaleComputer_Cleanup.ps1 -DC "Domain Controller" -Old "PC Not logged in for X amount days" -Path "Path of the folder you want the report saved too"

Example:

.\AD_StaleComputer_Cleanup.ps1 -DC "DCServer01" -Old 90 -Path "C:\Path\of\Folder"

To download the script head over to my blog: http://timrd.blogspot.com/2012/08/find-ad-stale-computers.html


Reply:

Might be something you want to contribute to the gallery

TechNet Gallery


If you find that my post has answered your question, please mark it as the answer. If you find my post to be helpful in anyway, please click vote as helpful.


------------------------------------
Reply:

Hi,

Thanks for your sharing, it would be helpful for others in this forum.

Regards,

Yan Li


Yan Li

TechNet Community Support


------------------------------------
Reply:

Uploaded:

http://gallery.technet.microsoft.com/Active-Directory-Stale-f775cc22

Thanks for the info.  I didn't know that was out there. 

Tim DeCenso
http://about.me/decenso
http://timrd.blogspot.com


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

when i archive mails from inbox to arcive folder one copy is going in recover deleted items.

when i archive mails from inbox to arcive folder one copy is going in recover deleted items.

Reply:
it is happening for all users...

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

dashboard pages

how to create a dashboard designer reports using sharepoint.anybody give me real time example

chow

How to create answer file for deploying OS only for the Root partition means C:

Hi,

Can anyone help me how to create unattended answer file for deploying windows 7 OS. 

Here i had already loaded OS and created partition as mentioned below,

C: 50 GB

D: 100 GB

E: 100 GB

I need to flash my OS only to the C: partition using unattended answer file which is created by WAIK tool.

Anyone please help me on this


Reply:

In your answer file you want to set these options.

Microsoft-Windows-Setup\DiskConfiguration\Disk\ModifyPartions\ModifyPartion
    Active = true
    Format = NTFS
    label = Windows (or whatever you so choose)
    Letter = C
    Order = 1
    PartitionID = 1 

Microsoft-Windows-Setup\ImageInstall\OSImage\InstallTo
    DiskID = 0
    PartitionID = 1

This TechNet Article here http://technet.microsoft.com/en-us/library/cc749317(v=ws.10).aspx should help you aswell.

Lain


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

BizTalk Mapping Clarification

I am having a Source and Destination Schema and using direct map i will get the output.

My scenario is if the field is not present in the source schema but i need to populate the fields in the output.

For Example: I am having Date,Name,Country, State in the Source schema. In Detination schema having FullName,Country,State,Date

I am using directmapping. Name to Name,County to Country, State to State. If the Name is not present in the Source, in the output i need the empty filed.( like <Name/>). But in direct mapping is it possible to achieve this scenario.

I have checked the XSLT, in that there is a if condition, it will check for the filed if the field is not present in the source schema it wont populate the output with the empty filed. So please tell me is there any possibility to achive in schema itself.

Note: I will achieve the same scenarion using XSLT. I want to achieve this in Schema.


Aboorva Raja R


Reply:

As of my knowledge we can achive it by Two ways,

1. Use a script component for a dotnet component input as source schema element which one u want to check. the dotnet component will check the value corresponding output will be element value or emtty string

2.i.promote the destination schema. ii.In the expression shape check the element/value is present by using xpath, if u did not find the values then u can assign empty string to the element  (after mapping completed).


Thanks, Vasantha Prabakaran


------------------------------------
Reply:

Hey Raja,

You can do this by using 1 Logical Existance, 2 Value Mapping, 1 Logical Not and 1 String Concat Functoid.

Map

Connect Src/Name > Logical Existance Functoid > ValueMapping 1 > Dest/Name
Connect Src/Name > ValueMapping 2 (As Second Input Parameter)
Connect Logical Existance Functoid > Logical NOT Functoid > Value Mapping Functoid 2 >Dest/Name
Add a Constant "" in the String Concat Functoid > ValueMapping Functoid 2 (As Second Input Parameter)

Explanation : We check if the field exists , then we pass the actual value to the Output field.
If field not exists , we pass "". We use logical not functoid to negate the output of Logical existance.

Repeat the same for all the fields. I assume all the mentioned fields are string. 

Thanks.
Sriram N

http://srirambiztalks.wordpress.com/

Please mark this as answer if it helps.


Sriram N http://srirambiztalks.wordpress.com/


------------------------------------
Reply:

Sriram thanks for your reply, it will be helpful incase of 2 or 3 node.

Actually i need to check these condition for 130 fileds. So if i use this concept it will become  complicate Map. So i will go with the XSLT implementation instead of using functoid.

By default the mapping in biztalk will assumes some condition like,

if we do direct/one to one mapping it is assuming to check the if conditon.

Eg:

<xsl:if test="S3:Name><FullName><xsl:value-of select="Name"></FullName>                                                                                                                                                                                       

So if we can remove the if condition in xslt then we will get the node in the output, if node is not present in the source. if node present we will get the correct value in the output.

Thanks,

Aboorva Raja R

Please Mark this as answer if it helps.


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

SQL server 2008R2 replication

Hi there,

I have some query about sql replication. Actually i want to deploy SQL server replication in 3 servers 2 in DC and 1 in DR , Can i

make 2 subscriber? 1 for DC and 1 for DR so that the publisher/distributer can synchronize the both machine in the same time?

How much bandwidth does it utilize. Is it a good solution?


Regards, Ishuv


  • Edited by Ishuv Wednesday, August 29, 2012 8:12 AM

Reply:

Hi Ishuv,
It is possible to have 2 subscribers. For network bandwidth you will need to evaluate the network switches and routers used to reach to servesr in another DC.

If you are having network latecny to other DC, I would advise to use logshipping.

Thanks,


Kindly mark the reply as answer if they help


------------------------------------
Reply:

Hi Sunil,

What if i create a cluster first and then replicate to DR? Is it a best practice?


Regards, Ishuv


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

share point portal 2010

hello sir,

 i am sanghamitra mohanty ,  i wanna know how to instal share point portal 2010 installing. 

 

Custom Form with code behind with Custom List

I am new to sharepoint 2010 and we have Standard Edition. I have a project in which i need Custom Forms with code behind functionality so I can write events on TextBoxes and DropDowns and PageLoad also like we do in ASP.NET C# application.

I have created a Custom List in a subsite called "Purchase Order". Using designer I can see "NewForm.aspx", "EditForm.aspx" and "DispForm.aspx" but I cant get full code behind functionality using default forms.

So in my case what should I do to achieve my goal. What is the best practice to achieve this.

1. Should I develop all three forms in Visual studio as Visual Webpart and use SP object model to write data in list programatically?

2. In Case of Edit of item do I need to retrieve list item data into textboxes again and update the list item?

Or is there any easy way to use code behind with full control and associate forms with custom list ..please guide as I am so confused.

Thanks


Reply:

hi

developing or designing new Forms have several drawbacks and are error prone. i recommend to use delegate Controls to inject what code you want to ListForms Dynamically. I explained this method in bellow links:

How to add extra functionality to SharePoint standard pages and Controls contained in those pages, without changing pages –part 2: custom functionality in ListForm pages

How to add extra functionality to SharePoint standard pages and Controls contained in those pages, without changing pages –part 1: create a delegate Control As commander of pages


yaşamak bir eylemdir


------------------------------------
Reply:
Using your technique can I play with every control on the form and all the events will be available to play with?

------------------------------------
Reply:

yes

you can inject extra Functionality and Code to all Controls in pages and webparts

if you say your needed Control or event, i can explain mor


yaşamak bir eylemdir



------------------------------------
Reply:

Wll suppose i have a form called "NewPurchaseOrder.aspx" and have two controls like "TextBox1", "DropDown1" and "Button1" now I want to do three things.

1. On Page Load I want to set "Hello there" in control "TextBox1"

2. On click of Button1 I want to fill the dropdown with some values.

Is this possible


------------------------------------
Reply:

hi

in your List, you must ha to Column, assuming Title is a Text field and a lookup or choice field

what is the mean of " I want to fill the dropdown with some values"?

add choices? select one of choices? or in multilookup, select several items?


yaşamak bir eylemdir


------------------------------------
Reply:

Okay let me explain.

I have opened my portal's home page...I went into Site Settings...created a custom list called "PurchaseOrders"

In Custom List "Purchase Order" I have following fields.

1. Title ---> Text

2. PONumber --> Text

3. ItemNames --> Choices  for example "Item 1", "Item 2", "Item 3" etc etc.

4. Quantity

Now I want "NewPurchaseOrder" form in which I can place controls(textboxes and dropdown accordingly) and can access the events (same like in ASP.NET C# application) and do stuff like enable/disable textboxes, move values into textboxes, add/delete items in dropdown controls...etc.

Also I want "EditPurchaseOrder" too and fetch details of item when user will click on specific Purchase Order.

How to implement all this ..I thought I would open Visual Studio and write two Visual webparts ..One for "NewPurchaseOrders" and take input from user and write into Custom List programtically using SP Object model or second choice you are telling me to use Delegate control.

Now you suggest.

thanks


------------------------------------
Reply:

hi 

i explain simply

assum that you have to column:

title->text

ItemNames ->choice

user must write in title and click a button, then item names related to title will be added to ItemNames choice field. so do as bellow:

1-in page_Load write following Code:

 protected void Page_Load(object sender, EventArgs e)   {   WebPartManager webPartManager = WebPartManager.GetCurrentWebPartManager(this.Page);      foreach (Microsoft.SharePoint.WebPartPages.WebPart wp in webPartManager.WebParts)   {   if (wp is ListFormWebPart)   {   listForm = wp as ListFormWebPart;   break;   }   }       if (listForm != null &&   (listForm.PageType == PAGETYPE.PAGE_NEWFORM || listForm.PageType == PAGETYPE.PAGE_NEWFORMDIALOG) &&   listForm.ItemContext.List.Title == "testList")   {   CompositeField TitleCF = getCompositFieldFromListForm(listForm, "Title");   Button btn = new Button();   btn.Text = "click to fill";   btn.Click += btn_Click;   foreach (Control ctrl in TitleCF.Controls[0].Controls)   {   if (ctrl is FormField)   ctrl.Controls.Add(btn);   }    }     }

2- in button click event write bellow Code

 void btn_Click(object sender, EventArgs e)   {   CompositeField TitleCF = getCompositFieldFromListForm(listForm, "Title");   FormField Title=getFormFieldFromCompositField(TitleCF);   CompositeField ChoiceFieldCF = getCompositFieldFromListForm(listForm, "ItemNames");   DropDownList ddl=getWebControlFromCompositField(ChoiceFieldCF,typeof(DropDownList)) as DropDownList;   //compare Title and find related items then add that items to dropdownList   if(Title.Value as string=="test1")   {   ddl.Items.Clear();    ddl.Items.Add("testVal1");   ddl.Items.Add("testVal2");   }      } 

3- deploy project, your newForm page will be as bellow:


yaşamak bir eylemdir


------------------------------------
Reply:

Yasamak I must say it seems fantastic and think I can achive the functionality using your suggestion. Just tell me one last thing where will I find "page_load" and "btn_Click" event as in the default "NewForm.aspx" there is no code behind. Do I need to do something in Visual Studio? that part will answer my question completly. And yeah thanks for pointing me to the right direction I am so greatful to you.


------------------------------------
Reply:

------------------------------------
Reply:

Hi Yasamak,

I've tried your code and followed the links what you have provided. But its not working somehow. My first target is in EditForm's copy "edit2.aspx" I have a field called "Title" so when user will Edit any list item it will move "hello there" in the Title Field but its not working. Here is the code ..plz check what I am doing wrong. Oh by the way Following is the Bamboo Solution Tutorial I've followed to create the custom list and created custom form. In that custom form I am placing your code.

http://community.bamboosolutions.com/blogs/sharepoint-2010/archive/2011/05/12/sharepoint-2010-cookbook-how-to-create-a-customized-list-edit-form-for-development-in-visual-studio-2010.aspx

using System;  using Microsoft.SharePoint;  using Microsoft.SharePoint.WebControls;  using Microsoft.SharePoint.WebPartPages;  using System.Web.UI.WebControls.WebParts;  using System.Web.UI;  using System.Web.UI.WebControls;    namespace JoshWorldListDefinition.Layouts.JoshWorldListDefinition  {   public partial class edit2 : WebPartPage   {   ListFormWebPart listForm = null;   protected void Page_Load(object sender, EventArgs e)   {   {   WebPartManager webPartManager = WebPartManager.GetCurrentWebPartManager(this.Page);     foreach (Microsoft.SharePoint.WebPartPages.WebPart wp in webPartManager.WebParts)   {   if (wp is ListFormWebPart)   {   listForm = wp as ListFormWebPart;   break;   }   }       if (listForm != null && (listForm.PageType == PAGETYPE.PAGE_EDITFORM || listForm.PageType == PAGETYPE.PAGE_EDITFORMDIALOG) && listForm.ItemContext.List.Title == "JoshWorldListDefinition - ListInstance1")   {   CompositeField TitleCF = getCompositFieldFromListForm(listForm, "Title");   BaseFieldControl TitleTB = getFormFieldFromCompositField(TitleCF);     TitleTB.Value = "Hello There";     // Button btn = new Button();   // btn.Text = "click to fill";   //// btn.Click += btn_Click;   // foreach (Control ctrl in TitleCF.Controls[0].Controls)   // {   // if (ctrl is FormField)   // ctrl.Controls.Add(btn);   // }   }     }   }     protected CompositeField getCompositFieldFromListForm(ListFormWebPart listForm, string fieldName)   {   foreach (Control ctr in listForm.Controls[0].Controls) //listForm.Controls[0] is templateContiner   {   if (ctr is ListFieldIterator)   {   ListFieldIterator lfi = ctr as ListFieldIterator;     foreach (TemplateContainer fieldTC in lfi.Controls)   {   foreach (Control ct in fieldTC.Controls)   {   if ((ct is CompositeField) && (ct as CompositeField).FieldName == fieldName)   return (ct as CompositeField);   }   }   }   }   return null;   }   protected Control getWebControlFromCompositField(CompositeField comField, Type wctrlType)   {   foreach (Control ctrl in comField.Controls[0].Controls)   {   if (ctrl is FormField)   {   foreach (Control wctrl in ctrl.Controls[0].Controls)   {   if (wctrl.GetType() == wctrlType)   return wctrl;   }   }   }   return null;   }   protected BaseFieldControl getFormFieldFromCompositField(CompositeField comField)   {   foreach (Control ctrl in comField.Controls[0].Controls)   {   if (ctrl is FormField)   return ctrl.Controls[0] as BaseFieldControl;   }   return null;   }   }  }



------------------------------------
Reply:

hi 

you do not need custom form

this method changes sharepoin default forms. you only deploy that delegate control and it change sharepoint default forms The way you like, Controls inside custom forms may be different than ListForm Webpart.

you must write that codes in Page_Load function of user control

in solution explorer ControlTemplates>ilkerAlizatDelegateControl>CommanderControl

my name is ilker

"yaşamak bir eylemdir" is my slogan.


yaşamak bir eylemdir




------------------------------------
Reply:

Please bare with me as I am in learning stage. Let me clear my concept.

1. Need to create custom list for example "CL_PurchaseOrders"

2. Open Visual Studio

3. Follow your following tutorial

How to add extra functionality to SharePoint standard pages and Controls contained in those pages, without changing pages –part 1: create a delegate Control As commander of pages

4. Add the following code into your existing code behind file "CommanderControl.ascx.cs"

protected void Page_Load(object sender, EventArgs e)   {   {   WebPartManager webPartManager = WebPartManager.GetCurrentWebPartManager(this.Page);     foreach (Microsoft.SharePoint.WebPartPages.WebPart wp in webPartManager.WebParts)   {   if (wp is ListFormWebPart)   {   listForm = wp as ListFormWebPart;   break;   }   }       if (listForm != null && (listForm.PageType == PAGETYPE.PAGE_EDITFORM || listForm.PageType == PAGETYPE.PAGE_EDITFORMDIALOG) && listForm.ItemContext.List.Title == "JoshWorldListDefinition - ListInstance1")   {   CompositeField TitleCF = getCompositFieldFromListForm(listForm, "Title");   BaseFieldControl TitleTB = getFormFieldFromCompositField(TitleCF);     TitleTB.Value = "Hello There";     // Button btn = new Button();   // btn.Text = "click to fill";   //// btn.Click += btn_Click;   // foreach (Control ctrl in TitleCF.Controls[0].Controls)   // {   // if (ctrl is FormField)   // ctrl.Controls.Add(btn);   // }   }     }   }     protected CompositeField getCompositFieldFromListForm(ListFormWebPart listForm, string fieldName)   {   foreach (Control ctr in listForm.Controls[0].Controls) //listForm.Controls[0] is templateContiner   {   if (ctr is ListFieldIterator)   {   ListFieldIterator lfi = ctr as ListFieldIterator;     foreach (TemplateContainer fieldTC in lfi.Controls)   {   foreach (Control ct in fieldTC.Controls)   {   if ((ct is CompositeField) && (ct as CompositeField).FieldName == fieldName)   return (ct as CompositeField);   }   }   }   }   return null;   }   protected Control getWebControlFromCompositField(CompositeField comField, Type wctrlType)   {   foreach (Control ctrl in comField.Controls[0].Controls)   {   if (ctrl is FormField)   {   foreach (Control wctrl in ctrl.Controls[0].Controls)   {   if (wctrl.GetType() == wctrlType)   return wctrl;   }   }   }   return null;   }   protected BaseFieldControl getFormFieldFromCompositField(CompositeField comField)   {   foreach (Control ctrl in comField.Controls[0].Controls)   {   if (ctrl is FormField)   return ctrl.Controls[0] as BaseFieldControl;   }   return null;   }   }  }

Am I right and following right steps? or missing something.


------------------------------------
Reply:

hi

That's right, all you have to do is what you said


yaşamak bir eylemdir


------------------------------------
Reply:
let me just test it and revert back :)

------------------------------------
Reply:

Ilker,

I just tried all the steps. Here is the code I have in code behind but its not working. I am simply initiating "Title" with "hello world".

using System;  using System.Web.UI;  using System.Web.UI.WebControls;  using System.Web.UI.WebControls.WebParts;  using Microsoft.SharePoint.WebPartPages;  using Microsoft.SharePoint;  using Microsoft.SharePoint.WebControls;    namespace CustomFormDelegateControl.ControlTemplates.CustomFormDelegateControl  {   public partial class CommanderControl : UserControl   {   ListFormWebPart listForm = null;     protected void Page_Load(object sender, EventArgs e)   {   WebPartManager webPartManager = WebPartManager.GetCurrentWebPartManager(this.Page);     foreach (Microsoft.SharePoint.WebPartPages.WebPart wp in webPartManager.WebParts)   {   if (wp is ListFormWebPart)   {   listForm = wp as ListFormWebPart;   break;   }   }       if (listForm != null && (listForm.PageType == PAGETYPE.PAGE_NEWFORM || listForm.PageType == PAGETYPE.PAGE_NEWFORMDIALOG) &&   listForm.ItemContext.List.Title == "CL_Products")   {     CompositeField TitleCF = getCompositFieldFromListForm(listForm, "Title");   BaseFieldControl TitleTB = getFormFieldFromCompositField(TitleCF);     TitleTB.Value = "hello world";   }         }       protected CompositeField getCompositFieldFromListForm(ListFormWebPart listForm, string fieldName)   {   foreach (Control ctr in listForm.Controls[0].Controls) //listForm.Controls[0] is templateContiner   {   if (ctr is ListFieldIterator)   {   ListFieldIterator lfi = ctr as ListFieldIterator;     foreach (TemplateContainer fieldTC in lfi.Controls)   {   foreach (Control ct in fieldTC.Controls)   {   if ((ct is CompositeField) && (ct as CompositeField).FieldName == fieldName)   return (ct as CompositeField);   }   }   }   }   return null;   }     protected Control getWebControlFromCompositField(CompositeField comField, Type wctrlType)   {   foreach (Control ctrl in comField.Controls[0].Controls)   {   if (ctrl is FormField)   {   foreach (Control wctrl in ctrl.Controls[0].Controls)   {   if (wctrl.GetType() == wctrlType)   return wctrl;   }   }   }   return null;   }     protected BaseFieldControl getFormFieldFromCompositField(CompositeField comField)   {   foreach (Control ctrl in comField.Controls[0].Controls)   {   if (ctrl is FormField)   return ctrl.Controls[0] as BaseFieldControl;   }   return null;   }         }  }


------------------------------------
Reply:

Are you sure delegate control is activate?

can you debug it and see error?

do you have changed master page?



yaşamak bir eylemdir


------------------------------------
Reply:

an other thing

field values will assigned after page_load function and its value will be Title fields default value, so if you want to change default value for Title, set it in List settings.

test as beloow :

 //TitleTB.Value = "Hello There";     Button btn = new Button();   btn.Text = "click to fill";   //// btn.Click += btn_Click;   foreach (Control ctrl in TitleCF.Controls[0].Controls)   {   if (ctrl is FormField)   ctrl.Controls.Add(btn);   }


yaşamak bir eylemdir


------------------------------------
Reply:

Weird that my debugger is not hitting the code even though i have breakpoint. The feature is activated as the attached snap. I've tried to change the webpart title also but that also not working. its so frustrating as I have followed your instructions religiously but still no luck.


------------------------------------
Reply:

hi

i tested it in sharepoint foundation 2010 and sharpoint server 2010 and result is OK.

in my sample i used delegate location "GlobalNavigation".

it may be that your master page do not have that location(you changed master page or you changed default master page v4.master.

try with other delegate locations(GlobalSiteLink0,,GlobalSiteLink2,SmallSearchInputBox,...)

for changing location in CommanderDelegate change as bellow:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">   <Control Id="SmallSearchInputBox" Sequence="3" ControlSrc="~/_ControlTemplates/ilkerAlizatDelegateControl/CommanderControl.ascx"></Control>  </Elements>


yaşamak bir eylemdir



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

SharePoint Shell Admin

Hi Friends,

When I tried to add my service account to Shell Admin I got this below error.

PS C:\Users\Service Account> add-spshelladmin Domain\Service Account
Add-SPShellAdmin :
     "Cannot add Domain\Service Account to the SharePoint_Shell_Access role of th
e database SharePoint_Config. A possible cause of this error is that the accoun
t name was already added to the database as a login using a different user name
than the account name."
At line:1 char:17
+ add-spshelladmin <<<<  Domain\Service Account
    + CategoryInfo          : InvalidData: (Microsoft.Share...AddSPShellAdmin:
   SPCmdletAddSPShellAdmin) [Add-SPShellAdmin], ArgumentException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddSPShellAdmin

How to solve this problem?

Thanks in Advance

GHP

  

  • Moved by Bill_Stewart Monday, August 27, 2012 2:15 PM Move to more appropriate forum (From:The Official Scripting Guys Forum!)

Reply:
Is the service account set as dbo login in the config database?

------------------------------------
Reply:
Yes, the service account is a dbo login in the config database.

------------------------------------
Reply:

We cannot add 2 users with the same login to the database.

What's the need to add this account as a Shell Admin? Typically, the farm account will be the dbo login of the config database.


------------------------------------
Reply:

Since, the service account is not a Shell Admin, I am not able to run the Powershell script from the C#. It throws error as "you cannot call a method on a null-valued expression".


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

hiding rows in sharepoint rows based on user login

hi,

I have a requirement that showing items of list based on user login i.e. created person can see his details only.

I know about restriction of show only their items in settings but here i need alert me also if any new item created in that.

alert me not workign when this restriction activated.

So is there any other solution to get alert me mails and at the same time to show only their items on the list allitems.aspx.

Thanks in advance....


haritha

"support" staff of no help

My Technet Windows 7 Enterprise MAK has stopped working following your changes to the Technet program in July.

VAMT shows the key has 0 remaining activations. I've actually used the key probably 20 times over the last three years on three physical machines, so I should be nowhere near the 500 activation limit.

How do I get the activation count reset on this key, or a new Windows 7 Enterprise MAK issued? Two weeks and ten emails with the Technet "support" team has lead me to discover that they don't support MIME attachments or PNG format screenshots of the relevant pages showing my account info and license key information.

And after an hour and two phone calls of trying to get through to the relevant support people via telephone, I've found that the Volume Activation support people who eventually pick up the call don't know what Technet is. So I'm not keen to not try that route again.

Other than cancelling my subscription and forgetting about it, what are my options?

  • Moved by Just Karl Tuesday, August 28, 2012 1:34 PM Incorrect forum (From:MSDN, TechNet, and Expression Profile and Recognition System Discussions)
  • Changed type Nicholas Li Wednesday, September 5, 2012 1:56 AM

Reply:

This forum is for discussions on Microsoft's profile system and recognition system only, not for product support.

I'd ask in the Windows 7 Installation, Setup, and Deployment forum, which is where I will move this thread.

Karl


When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer



My Blog: http://unlockpowershell.wordpress.com
My Book: Windows PowerShell 2.0 Bible
My E-mail: -join ("6B61726C6D69747363686B65406D742E6E6574"-split"(?<=\G.{2})",19|%{[char][int]"0x$_"})


------------------------------------
Reply:

Hi,

This issue refers to License key information, I would like suggest you make a call to Microsoft for further help.

Thank you for your understanding.


Your Name

TechNet Community Support


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

Spilt for format

Hi Bob,

I'm afraid there is no such option would able to change the location. Is it that annoying? I would say no.. just in my opinion :)

But there should be a way to do so if you are interested in development solution, that is to develop the customized Fluent User Interface instead.

Check the resources in MSDN Dev center:

Office Fluent User Interface, Ribbon, and Backstage view

http://msdn.microsoft.com/en-us/office/aa905530.aspx

For help on Office development, visit the Office for Developers forum:

http://social.msdn.microsoft.com/Forums/en-us/category/officedev


Max Meng

TechNet Community Support

  • Split by Max Meng Wednesday, August 29, 2012 1:27 PM split for format

SQL SSMS "The proper type library could not be found in the system registry"

While running SQL SSMS in Windows 2008 R2 server getting below error

---------------------------
Microsoft SQL Server Management Studio
---------------------------
The proper type library could not be found in the system registry.

An attempt to repair this condition failed because you do not have the
permissions to write to the system registry or because the type library could not be loaded.

This can be fixed by a system administrator running this program once,
which will cause the proper file to be registered. If problems still persist, then
try repairing this application from the setup program.

Any solution for this?

Environment: Windows 2008 R2 Standard Server x64, SQL 2008 ADVEXP.

                              



Reply:

Hi,


This issue can be caused a permissions issue in the registry. You can correct registry permissions so you could open SSMS. Change the ownership in the parent folder in registry. Give full control to local admin.


Meanwhile, you could also try the following:


Verify .NET Framework 3.5.1 is turned on. You can refer to this http://windows.microsoft.com/en-us/windows7/Turn-Windows-features-on-or-off 
Repair SQL Server installation using the following resource: How to: Repair a Failed SQL Server 2008 R2 Installation


Also, here is a similar thread for your reference: SQL Server 2008 -- Proper Type Library error


Hope this helps.   


Vincent Wang

TechNet Community Support



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

No comments:

Post a Comment

Setup is Split Across Multiple CDs

Setup is Split Across Multiple CDs Lately I've seen a bunch of people hitting installation errors that have to do with the fact th...