Category: Microsoft
Category Archives: Microsoft
Import IOCs to Defender for Endpoint
Good day,
I have been trying to import IOCs to Defender for Endpoint using a csv file.
I used the example of the sample template that is provided but it is giving me errors. Is there any other method that I can use?
Kind regards,
Good day, I have been trying to import IOCs to Defender for Endpoint using a csv file.I used the example of the sample template that is provided but it is giving me errors. Is there any other method that I can use?Kind regards, Read More
Connecting Excel to Power BI Dataset with parameters
Hi there,
I’m trying to connect to a Power BI dataset from Excel and to pass a parameter from a cell or rangename. When I go to the connection settings, the parameter box is greyed out. Is there a way to get around this?
Alternatively, in the DAX code in the Command text box, it currently begins with something like
DEFINE
VAR __DS0FilterTable =
FILTER(KEEPFILTERS(VALUES(‘Data'[OrgID])), ‘Data'[OrgID] = 303)
etc….
I would like to replace 303 with a range name or cell reference.
Thanks!
Hi there,I’m trying to connect to a Power BI dataset from Excel and to pass a parameter from a cell or rangename. When I go to the connection settings, the parameter box is greyed out. Is there a way to get around this?Alternatively, in the DAX code in the Command text box, it currently begins with something like DEFINE
VAR __DS0FilterTable =
FILTER(KEEPFILTERS(VALUES(‘Data'[OrgID])), ‘Data'[OrgID] = 303)
etc…. I would like to replace 303 with a range name or cell reference. Thanks! Read More
Alphabetise help
Everyone has been so helpful on this forum; there are really some true experts. I’m making tracks with Excel but have really hit a stumbling block which seems like it should be an easy fix but I just can’t work it out.
So I’m taking data from Cells B2, O64 on sheet named ‘Remove 0s’
I’m transpose and alphabetising this information into Cells B2, 064 on sheet named ‘Alphabetised’
I’m using the formula
=SORTBY(‘Remove 0s’!B3:O64, ‘Remove 0s’!B3:B64, 1)
I need to cover that range of cells as more data may appear in the other rows up to row 64. As you can see from the picture, it is in ascending order however it has prioritised all of the blank cells first. I need those at the bottom.
Please could someone be so kind as to help me out. It’s hugely appreciated.
Thanks
Graeme
Everyone has been so helpful on this forum; there are really some true experts. I’m making tracks with Excel but have really hit a stumbling block which seems like it should be an easy fix but I just can’t work it out. So I’m taking data from Cells B2, O64 on sheet named ‘Remove 0s’ I’m transpose and alphabetising this information into Cells B2, 064 on sheet named ‘Alphabetised’ I’m using the formula =SORTBY(‘Remove 0s’!B3:O64, ‘Remove 0s’!B3:B64, 1) I need to cover that range of cells as more data may appear in the other rows up to row 64. As you can see from the picture, it is in ascending order however it has prioritised all of the blank cells first. I need those at the bottom. Please could someone be so kind as to help me out. It’s hugely appreciated. ThanksGraeme Read More
Microsoft Entra SSO integration with FortiGate SSL VPN connectivity issue
Scenario: Microsoft Entra SSO integration with FortiGate SSL VPN
I am unable to connect via FortiClient vpn version 7.2.x.x.
But when i use FortiClient vpn client version 7.0.x.x.x to connect SSL VPN via Azure ID with SAML Authentication. its connect in 2nd attempt or 3rd attempt every time not in first attempt. In first attempt ask 2FA but not connected. when i try again in 2nd or 3rd attempt so without 2FA prompt just directly connected. is it bug or configuration issue on FortiClient firewall side or Azure FortiGate SSL VPN application side?? please suggest
Scenario: Microsoft Entra SSO integration with FortiGate SSL VPNI am unable to connect via FortiClient vpn version 7.2.x.x.But when i use FortiClient vpn client version 7.0.x.x.x to connect SSL VPN via Azure ID with SAML Authentication. its connect in 2nd attempt or 3rd attempt every time not in first attempt. In first attempt ask 2FA but not connected. when i try again in 2nd or 3rd attempt so without 2FA prompt just directly connected. is it bug or configuration issue on FortiClient firewall side or Azure FortiGate SSL VPN application side?? please suggest Read More
Why does my Userform freeze when ShowModal is False?
I am new to Modal and Modeless Userforms. I am trying to build a simple Userform as a proof of concept that you can change the contents of cells on a sheet and still run your Userform. My goal is to have a Userform that stays loaded, shown, and swaps the values of two cells every time I hit swap cells.
For simplicity’s sake, let’s just assume that no data validation is needed.
This Userform has two RefEdits and a Command Button called cmdSwapCells. When hit, the command button swaps the contents of the two cells referenced by the RefEdits. Here is the code for the sub, SwapCellValues, which is called when the cmdSwapCells_Enter or the cmdSwapCells_Click events trigger.
Private Sub SwapCellValues()
Dim RangeA As Range, RangeB As Range
ValA As String, ValB As String
Set RangeA = Range(RefEdit1.value)
Set RangeB = Range(RefEdit2.value)
ValA = RangeA.value
ValB = RangeB.value
RangeA.value = ValB
RangeB.value = ValA
End Sub
I am new to Modal and Modeless Userforms. I am trying to build a simple Userform as a proof of concept that you can change the contents of cells on a sheet and still run your Userform. My goal is to have a Userform that stays loaded, shown, and swaps the values of two cells every time I hit swap cells. For simplicity’s sake, let’s just assume that no data validation is needed. This Userform has two RefEdits and a Command Button called cmdSwapCells. When hit, the command button swaps the contents of the two cells referenced by the RefEdits. Here is the code for the sub, SwapCellValues, which is called when the cmdSwapCells_Enter or the cmdSwapCells_Click events trigger. Private Sub SwapCellValues()
Dim RangeA As Range, RangeB As Range
ValA As String, ValB As String
Set RangeA = Range(RefEdit1.value)
Set RangeB = Range(RefEdit2.value)
ValA = RangeA.value
ValB = RangeB.value
RangeA.value = ValB
RangeB.value = ValA
End Sub Read More
Unable to Login to Norton My Account:
Unable to Login to Norton My Account:
Introduction
In the realm of cybersecurity, Norton stands as a leading name, offering robust solutions to safeguard your digital life. However, there may be times when you face issues logging into your Norton account. This comprehensive guide will walk you through the steps to troubleshoot and fix these issues.
Step 1: Open Your Web Browser
The first step in the process is to open your preferred web browser. This could be Google Chrome, Mozilla Firefox, Safari, or Microsoft Edge. Each of these browsers offers a unique user experience but all provide access to the internet.
Step 2: Navigate to the Norton Website
Once your web browser is open, navigate to the Norton website. You can do this by typing www.norton.com into the address bar of your web browser and pressing Enter. The address bar is usually located at the top of your web browser.
Step 3: Click on ‘Sign In’
Upon reaching the Norton homepage, you’ll notice several options available on the page. Look for the ‘Sign In’ option located at the top right corner of the page. Click on it to proceed to the login page.
Step 4: Enter Your Login Credentials
You’ll now be redirected to the login page. Here, you’ll see two fields where you need to enter your registered email address and password. These are known as your login credentials. Ensure that you enter them correctly as they are case-sensitive.
Step 5: Click on ‘Sign In’
After entering your login credentials, click on the ‘Sign In’ button located below these fields. This action will verify your credentials and if they are correct, you will be granted access to your Norton account.
Troubleshooting Login Issues
If you’re unable to log in, here are some steps you can take:
Check Your Login Credentials
Ensure that you’ve entered your email address and password correctly. Remember that passwords are case-sensitive. If you’ve made any typographical errors while entering your credentials, correct them and try logging in again.
Reset Your Password
If you’ve forgotten your password or if it’s not working, click on the ‘Forgot password?’ link on the login page. You’ll be guided through a series of steps to reset your password. Once you’ve reset your password, try logging in again with the new password.
Check Your Internet Connection
Ensure that you have a stable internet connection. If your internet is slow or unstable, it may prevent you from logging in. Try refreshing your connection or switching to a different network and then attempt to log in again.
Contact Norton Support
If you’re still unable to log in after trying these steps, it’s time to contact Norton’s official customer support for further assistance. They have a team of experts who can help resolve your issue.
Conclusion
We hope this comprehensive guide helps you resolve any issues you’re facing while trying to log into your Norton account. Remember, keeping your antivirus software like Norton updated is crucial for protecting yourself from various online threats. Stay safe!
Note: This guide is intended for informational purposes only. For technical support or further assistance with logging into your Norton account or any other issues related to Norton products, please contact our official customer service.
Unable to Login to Norton My Account: IntroductionIn the realm of cybersecurity, Norton stands as a leading name, offering robust solutions to safeguard your digital life. However, there may be times when you face issues logging into your Norton account. This comprehensive guide will walk you through the steps to troubleshoot and fix these issues. Step 1: Open Your Web BrowserThe first step in the process is to open your preferred web browser. This could be Google Chrome, Mozilla Firefox, Safari, or Microsoft Edge. Each of these browsers offers a unique user experience but all provide access to the internet. Step 2: Navigate to the Norton WebsiteOnce your web browser is open, navigate to the Norton website. You can do this by typing www.norton.com into the address bar of your web browser and pressing Enter. The address bar is usually located at the top of your web browser. Step 3: Click on ‘Sign In’Upon reaching the Norton homepage, you’ll notice several options available on the page. Look for the ‘Sign In’ option located at the top right corner of the page. Click on it to proceed to the login page. Step 4: Enter Your Login CredentialsYou’ll now be redirected to the login page. Here, you’ll see two fields where you need to enter your registered email address and password. These are known as your login credentials. Ensure that you enter them correctly as they are case-sensitive. Step 5: Click on ‘Sign In’After entering your login credentials, click on the ‘Sign In’ button located below these fields. This action will verify your credentials and if they are correct, you will be granted access to your Norton account. Troubleshooting Login IssuesIf you’re unable to log in, here are some steps you can take: Check Your Login CredentialsEnsure that you’ve entered your email address and password correctly. Remember that passwords are case-sensitive. If you’ve made any typographical errors while entering your credentials, correct them and try logging in again. Reset Your PasswordIf you’ve forgotten your password or if it’s not working, click on the ‘Forgot password?’ link on the login page. You’ll be guided through a series of steps to reset your password. Once you’ve reset your password, try logging in again with the new password. Check Your Internet ConnectionEnsure that you have a stable internet connection. If your internet is slow or unstable, it may prevent you from logging in. Try refreshing your connection or switching to a different network and then attempt to log in again. Contact Norton SupportIf you’re still unable to log in after trying these steps, it’s time to contact Norton’s official customer support for further assistance. They have a team of experts who can help resolve your issue. ConclusionWe hope this comprehensive guide helps you resolve any issues you’re facing while trying to log into your Norton account. Remember, keeping your antivirus software like Norton updated is crucial for protecting yourself from various online threats. Stay safe! Note: This guide is intended for informational purposes only. For technical support or further assistance with logging into your Norton account or any other issues related to Norton products, please contact our official customer service. Read More
Microsoft Entra SSO integration with FortiGate SSL VPN issue
Scenario: Microsoft Entra SSO integration with FortiGate SSL VPN
I am unable to connect via FortiClient vpn version 7.2.x.x.
But when i use FortiClient vpn client version 7.0.x.x.x to connect SSL VPN via Azure ID with SAML Authentication. its connect in 2nd attempt or 3rd attempt every time not in first attempt. In first attempt ask 2FA but not connected. when i try again in 2nd or 3rd attempt so without 2FA prompt just directly connected. is it bug or configuration issue on FortiClient firewall side or Azure FortiGate SSL VPN application side?? please suggest
Scenario: Microsoft Entra SSO integration with FortiGate SSL VPNI am unable to connect via FortiClient vpn version 7.2.x.x.But when i use FortiClient vpn client version 7.0.x.x.x to connect SSL VPN via Azure ID with SAML Authentication. its connect in 2nd attempt or 3rd attempt every time not in first attempt. In first attempt ask 2FA but not connected. when i try again in 2nd or 3rd attempt so without 2FA prompt just directly connected. is it bug or configuration issue on FortiClient firewall side or Azure FortiGate SSL VPN application side?? please suggest Read More
Removing optional hyphen in Word
Hi,
I had the following problem in Word. I had a document which I did not create, and I had to format it. Once I turned on “Show Formatting Symbols,” I noticed these “optional hyphen” symbols which were so annoying. Here is the picture:
After trying to remove them unsuccessfully, I searched a lot on the internet and could not find a thing.
I have solved this by going to Find and Replace (Ctrl + H), expanding More options, and in the Special menu, I clicked on Optional Hyphen. Look at the picture:
It finally worked!
I just wanted to share this in case someone needs it.
Best regards,
Miloš Kozomara
Hi, I had the following problem in Word. I had a document which I did not create, and I had to format it. Once I turned on “Show Formatting Symbols,” I noticed these “optional hyphen” symbols which were so annoying. Here is the picture: After trying to remove them unsuccessfully, I searched a lot on the internet and could not find a thing.I have solved this by going to Find and Replace (Ctrl + H), expanding More options, and in the Special menu, I clicked on Optional Hyphen. Look at the picture: It finally worked! I just wanted to share this in case someone needs it. Best regards, Miloš Kozomara Read More
Little pro tip: paste values into 1 cell
Recently came about this little trick on how to paste multiple cells into one, and wanted to share.
You probably know you can make a selection and then perform Ctrl+C / Ctrl +V to copy-paste that selection. However, this will paste the selection into multiple cells. You could also try to paste into the formula bar, but this won’t work either.
The way to do this, is to open up the clipboard pane. Do a Ctrl+C on your selection. Then click in the formula bar (or press F2 as a shortcut). Next, click on the copied item from the clipboard pane to insert it. Et voila, you’ll have everything pasted into one cell.
Official documentation on how to use the clipboard pane: https://support.microsoft.com/en-au/office/copy-and-paste-using-the-office-clipboard-714a72af-1ad4-450f-8708-c2931e73ec8a
Bonus tip: If you want to manually type multiple lines in the same cell, instead of pressing enter, you press Alt+Enter to go to the next line in the same cell.
I also made a short video to demonstrate this, if you’d like to see how this is done: https://www.youtube.com/watch?v=H97SY7AL3k4 (sorry for the obnoxious thumbnail)
Recently came about this little trick on how to paste multiple cells into one, and wanted to share. You probably know you can make a selection and then perform Ctrl+C / Ctrl +V to copy-paste that selection. However, this will paste the selection into multiple cells. You could also try to paste into the formula bar, but this won’t work either. The way to do this, is to open up the clipboard pane. Do a Ctrl+C on your selection. Then click in the formula bar (or press F2 as a shortcut). Next, click on the copied item from the clipboard pane to insert it. Et voila, you’ll have everything pasted into one cell. Official documentation on how to use the clipboard pane: https://support.microsoft.com/en-au/office/copy-and-paste-using-the-office-clipboard-714a72af-1ad4-450f-8708-c2931e73ec8a Bonus tip: If you want to manually type multiple lines in the same cell, instead of pressing enter, you press Alt+Enter to go to the next line in the same cell. I also made a short video to demonstrate this, if you’d like to see how this is done: https://www.youtube.com/watch?v=H97SY7AL3k4 (sorry for the obnoxious thumbnail) Read More
Powershell extract TPM and Envryption Readiness information from Intune
Hi,
I’m trying to automate a report on Bitlocker coverage on Intune managed devices. I’m using Graph API to extract device information from Intune, querying this URL:
How can I extract this information over powershell?
Thanks
Hi,I’m trying to automate a report on Bitlocker coverage on Intune managed devices. I’m using Graph API to extract device information from Intune, querying this URL: “https://graph.microsoft.com/v1.0/deviceManagement/managedDevices”The result have a property named “isEncrypted” which has true or false. But I also need the information that exists on the Encryption report, about the TPM Version and Encryption readiness. Basically I need what is shown here:How can I extract this information over powershell?Thanks Read More
Macro Notification
Hello,
I need to create macro with pop up notification. I want notification to pop up 3 times
28 days till due date
14 days till due date
7 days till due date
Hello, I need to create macro with pop up notification. I want notification to pop up 3 times28 days till due date14 days till due date 7 days till due date Read More
IOS Device Registration Issue – Duplicate Devices
After configuring a Conditional Access Policy to require compliant devices, I noticed that user’s IOS devices were failing the compliance check. Further investigation showed the devices as listed in Intune were compliant, but when looking in Azure AD, the user would have (2) devices – one compliant and Intune managed and one not compliant. The AzureAD Device ID in Intune corresponded to the compliant Intune managed device listed in AzureAD as expected. The Sign in logs indicated the device (Device ID) failing the compliance check in the conditional access policy was the non-Intune managed device that was indicating not compliant in AzureAD.
Devices are Personally Owned, BYOD. We were using an Account Driven User Enrollment policy. Device enrollment into Intune seemed to be successful without any errors indicated. Devices were receiving the required apps upon enrollment.
I’ve successfully reproduced the issue numerous times using a test device and test account. After enrolling into Intune, there is only 1 device – non-MDM managed in the AzureAD (Device does show in Intune as compliant). Upon signing into the Company Portal app, the 2nd Intune Managed device shows up in the AzureAD list. However, the device doesn’t pass the conditional access policy when utilizing apps such as Outlook, conditional access policy sign in logs indicate conditional access policy failed due to non-compliant device. The Device ID indicated corresponds with the non-MDM managed device in AzureAD.
Switching to user enrollment with Company portal, and utilizing the Company portal app to enroll, everything works, and I only end up with 1 device in AzureAD.
I’m going crazy trying to resolve this. The Account driven enrollment was a few clicks easier for my very non-technical user base. Any insight or thoughts would be appreciated! I’ve got 100 devices enrolled, and I’m really not looking forward to having to re-enroll them all.
After configuring a Conditional Access Policy to require compliant devices, I noticed that user’s IOS devices were failing the compliance check. Further investigation showed the devices as listed in Intune were compliant, but when looking in Azure AD, the user would have (2) devices – one compliant and Intune managed and one not compliant. The AzureAD Device ID in Intune corresponded to the compliant Intune managed device listed in AzureAD as expected. The Sign in logs indicated the device (Device ID) failing the compliance check in the conditional access policy was the non-Intune managed device that was indicating not compliant in AzureAD. Devices are Personally Owned, BYOD. We were using an Account Driven User Enrollment policy. Device enrollment into Intune seemed to be successful without any errors indicated. Devices were receiving the required apps upon enrollment. I’ve successfully reproduced the issue numerous times using a test device and test account. After enrolling into Intune, there is only 1 device – non-MDM managed in the AzureAD (Device does show in Intune as compliant). Upon signing into the Company Portal app, the 2nd Intune Managed device shows up in the AzureAD list. However, the device doesn’t pass the conditional access policy when utilizing apps such as Outlook, conditional access policy sign in logs indicate conditional access policy failed due to non-compliant device. The Device ID indicated corresponds with the non-MDM managed device in AzureAD. Switching to user enrollment with Company portal, and utilizing the Company portal app to enroll, everything works, and I only end up with 1 device in AzureAD. I’m going crazy trying to resolve this. The Account driven enrollment was a few clicks easier for my very non-technical user base. Any insight or thoughts would be appreciated! I’ve got 100 devices enrolled, and I’m really not looking forward to having to re-enroll them all. Read More
Journaling not working for External Incoming email
Hello Team
My test environment is Exchange 2016 hybrid
I have enabled the journaling in exchange 2016 database level – Internal emails are getting journaling, however if i send an email from external like gmail, hotmail to the mailboxes which is on to the databases where journaling enabled, it not journaling
Am using Exchange 2016 standard version
What could be the possible
Hello Team My test environment is Exchange 2016 hybrid I have enabled the journaling in exchange 2016 database level – Internal emails are getting journaling, however if i send an email from external like gmail, hotmail to the mailboxes which is on to the databases where journaling enabled, it not journalingAm using Exchange 2016 standard version What could be the possible Read More
working on double elimination bracket need help with formula
have cell b8 with team 1
cell b10 with team 2
if cell c8 has a 2 need to fill cell d9 with cell c8 info
or if cell c10 has a 2 need to fill cell d9 with cell c10 info
if neither has a 2 need to have cell d9 blank.
if cell d9 has cell c8 info want cell b77 filled with cell c10 info or
if cell d9 has cell c10 info want cell b77 filled with cell c10 info
any help or ideas have had it figured out if i put a hidden cell with an extra formula trying to not have that.
have cell b8 with team 1 cell b10 with team 2 if cell c8 has a 2 need to fill cell d9 with cell c8 infoor if cell c10 has a 2 need to fill cell d9 with cell c10 infoif neither has a 2 need to have cell d9 blank.if cell d9 has cell c8 info want cell b77 filled with cell c10 info orif cell d9 has cell c10 info want cell b77 filled with cell c10 info any help or ideas have had it figured out if i put a hidden cell with an extra formula trying to not have that. Read More
I have removed my hotmail account accidentally, how can i restore this?
I accidentally (Saturday 5/4/2024) deleted my hotmail account and am desperately looking for a way to get it back, preferably with content.
It went as follows:
In account settings, > your details > Manage your email address or phone number for login > I initially added my business email address under account aliases
Next, I set my business address as the primary alias.
Then I deleted my email, not knowing that it would mean deleting my account completely.
I can’t log in to my hotmail account anymore.
Please can you help me to restore my email account
I accidentally (Saturday 5/4/2024) deleted my hotmail account and am desperately looking for a way to get it back, preferably with content. It went as follows:In account settings, > your details > Manage your email address or phone number for login > I initially added my business email address under account aliasesNext, I set my business address as the primary alias.Then I deleted my email, not knowing that it would mean deleting my account completely.I can’t log in to my hotmail account anymore. Please can you help me to restore my email account Read More
Connecting a SURFACE PRO 7 as a monitor to a LAPTOP STUDIO 2.
Hi, I’m looking for help in connecting a SURFACE PRO 7 as a monitor to a LAPTOP STUDIO 2.
The matter seems straightforward and intuitive, and it is when I try to connect them the other way. The PRO 7 detects the STUDIO 2 without any issues, and in the blink of an eye, the STUDIO 2 becomes a monitor. However, the STUDIO 2 doesn’t detect the PRO 7. I’ve already updated everything I could. I’ve restarted the computers, but unfortunately, nothing works.
Any ideas on how to solve this problem?
Hi, I’m looking for help in connecting a SURFACE PRO 7 as a monitor to a LAPTOP STUDIO 2. The matter seems straightforward and intuitive, and it is when I try to connect them the other way. The PRO 7 detects the STUDIO 2 without any issues, and in the blink of an eye, the STUDIO 2 becomes a monitor. However, the STUDIO 2 doesn’t detect the PRO 7. I’ve already updated everything I could. I’ve restarted the computers, but unfortunately, nothing works. Any ideas on how to solve this problem? Read More
Old picture shows up when signing up to sites and/or services
A very old profile picture of mine (pre-outlook) shows up when I sign up with my mail to new services/sites.
I don’t know if it also shows up when sending mails, but as I use my mail for professional purposes as well, I do not want the old picture to show.
I’ve checked my settings for both gmail (as I’ve linked it there) and microsoft and can’t find traces of the picture anywhere, yet it still shows up.
Please help.
A very old profile picture of mine (pre-outlook) shows up when I sign up with my mail to new services/sites. I don’t know if it also shows up when sending mails, but as I use my mail for professional purposes as well, I do not want the old picture to show. I’ve checked my settings for both gmail (as I’ve linked it there) and microsoft and can’t find traces of the picture anywhere, yet it still shows up.Please help. Read More
Tasks reappear after being marked as completed
This problem started several days ago. After I mark a task as complete it reappears immediately.
Signing out and logging in from my account did not help. Neither did deleting and reinstalling the app.
I like the app very much and don’t want to change to any other.
Please help me to solve this issue!
This problem started several days ago. After I mark a task as complete it reappears immediately. Signing out and logging in from my account did not help. Neither did deleting and reinstalling the app. I like the app very much and don’t want to change to any other. Please help me to solve this issue! Read More
Can I access User Secrets from a _Framework_ Web API project?
I’m targeting .NET Framework 4.8, mainly because I sometimes have to interact with Access databases and I assume I have a better chance of that working for framework than .NET Core.
When deployed, I want this API to pick up any credentials it needs from environment variables but I would like to be able to test it locally, so I’m trying to find the best place to store the credentials without checking them in.
I have read this and similar articles – user secrets seems like a reasonable solution, maybe there are better ones.
The part about “Manage User Secrets” in Visual Studio seemed to work at least partially: it installed Microsoft.Configuration.ConfigurationBuilders.UserSecrets and added this to my Web.config:
<configSections>
<section name=”configBuilders” type=”System.Configuration.ConfigurationBuildersSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” restartOnExternalChanges=”false” requirePermission=”false” />
</configSections>
<configBuilders>
<builders>
<add name=”Secrets” userSecretsId=”583724f7-d984-4688-84cd-cb8b28df5527″ type=”Microsoft.Configuration.ConfigurationBuilders.UserSecretsConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
</builders>
</configBuilders>
It loaded up a secrets.xml file and I can find examples of adding secrets to that.
Where I’m stuck is how to access them from the code. I see .NET Core examples where they call AddUserSecrets<Program>() on their ConfigurationBuilder in their Config.cs but again mine is a framework app and I just have a WebApiConfig.cs with a Register(HttpConfiguration config).
In there it accesses GlobalConfiguration.
I just don’t have the past experience to figure out what the analogous thing would be for framework.
Thanks,
-Jeff
I’m targeting .NET Framework 4.8, mainly because I sometimes have to interact with Access databases and I assume I have a better chance of that working for framework than .NET Core. When deployed, I want this API to pick up any credentials it needs from environment variables but I would like to be able to test it locally, so I’m trying to find the best place to store the credentials without checking them in.I have read this and similar articles – user secrets seems like a reasonable solution, maybe there are better ones.https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-8.0&tabs=windows&source=docs The part about “Manage User Secrets” in Visual Studio seemed to work at least partially: it installed Microsoft.Configuration.ConfigurationBuilders.UserSecrets and added this to my Web.config: <configSections>
<section name=”configBuilders” type=”System.Configuration.ConfigurationBuildersSection, System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” restartOnExternalChanges=”false” requirePermission=”false” />
</configSections>
<configBuilders>
<builders>
<add name=”Secrets” userSecretsId=”583724f7-d984-4688-84cd-cb8b28df5527″ type=”Microsoft.Configuration.ConfigurationBuilders.UserSecretsConfigBuilder, Microsoft.Configuration.ConfigurationBuilders.UserSecrets, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35″ />
</builders>
</configBuilders> It loaded up a secrets.xml file and I can find examples of adding secrets to that. Where I’m stuck is how to access them from the code. I see .NET Core examples where they call AddUserSecrets<Program>() on their ConfigurationBuilder in their Config.cs but again mine is a framework app and I just have a WebApiConfig.cs with a Register(HttpConfiguration config).In there it accesses GlobalConfiguration.I just don’t have the past experience to figure out what the analogous thing would be for framework.Thanks,-Jeff Read More
Can I ignore a single return value when multiple values are returned?
Some time ago, the ability to create a function which has multiple return values was created. Yes, I know this can be avoided by using out… but I was curious. In traditional method calls, the return value can be ignored by not assigning the return value to a variable. I recently decided to use multiple return values in a new method because I wanted to avoid having to worry about the method call when the return value isn’t always used. Turns out that may have been an oversight on my part, since I as far as I know, I still have to define a return value. For example, if the return signature of “MyFunction” is (int, bool) and I don’t need the bool value, I still have to define it (FAIK… which is the point here):
private (int, bool) MyFunction(…)
{
bool error = false;
int someReturnValue = 0;
//… does something and sets error if there is a problem
return (someReturnValue, error);
}
public void MyUnconcernedCallerFunction()
{
int ret;
bool error; // what if I don’t need to worry about the error here?
(ret, error) = MyFunction(…);
}
is there currently any convention that allows me to not declare the bool error value if I don’t need it? (i.e. can I ignore the bool part of the return?)
SIDE NOTE: Why isn’t there a general forum here? While my example is language specific, the question isn’t. This is just a general .NET question having to do with data and there are no general options in the “Choose a Label” options. I couldn’t post without choosing one so I just picked the one that made the most sense.
Some time ago, the ability to create a function which has multiple return values was created. Yes, I know this can be avoided by using out… but I was curious. In traditional method calls, the return value can be ignored by not assigning the return value to a variable. I recently decided to use multiple return values in a new method because I wanted to avoid having to worry about the method call when the return value isn’t always used. Turns out that may have been an oversight on my part, since I as far as I know, I still have to define a return value. For example, if the return signature of “MyFunction” is (int, bool) and I don’t need the bool value, I still have to define it (FAIK… which is the point here): private (int, bool) MyFunction(…)
{
bool error = false;
int someReturnValue = 0;
//… does something and sets error if there is a problem
return (someReturnValue, error);
}
public void MyUnconcernedCallerFunction()
{
int ret;
bool error; // what if I don’t need to worry about the error here?
(ret, error) = MyFunction(…);
} is there currently any convention that allows me to not declare the bool error value if I don’t need it? (i.e. can I ignore the bool part of the return?) SIDE NOTE: Why isn’t there a general forum here? While my example is language specific, the question isn’t. This is just a general .NET question having to do with data and there are no general options in the “Choose a Label” options. I couldn’t post without choosing one so I just picked the one that made the most sense. Read More